roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agillil...@apache.org
Subject svn commit: r547372 - /roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/planet/ui/PlanetSubscriptions.java
Date Thu, 14 Jun 2007 19:29:30 GMT
Author: agilliland
Date: Thu Jun 14 12:29:29 2007
New Revision: 547372

URL: http://svn.apache.org/viewvc?view=rev&rev=547372
Log:
for planet groups we only want to display feeds are are not local to the roller instance in
order to keep the subscriptions list minimized.


Modified:
    roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/planet/ui/PlanetSubscriptions.java

Modified: roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/planet/ui/PlanetSubscriptions.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/planet/ui/PlanetSubscriptions.java?view=diff&rev=547372&r1=547371&r2=547372
==============================================================================
--- roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/planet/ui/PlanetSubscriptions.java
(original)
+++ roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/planet/ui/PlanetSubscriptions.java
Thu Jun 14 12:29:29 2007
@@ -28,6 +28,7 @@
 import org.apache.roller.planet.business.PlanetManager;
 import org.apache.roller.planet.pojos.PlanetGroupData;
 import org.apache.roller.planet.pojos.PlanetSubscriptionData;
+import org.apache.roller.weblogger.config.RollerRuntimeConfig;
 
 
 /**
@@ -209,9 +210,20 @@
         
         List<PlanetSubscriptionData> subs = Collections.EMPTY_LIST;
         if(getGroup() != null) {
-            Set subsSet = getGroup().getSubscriptions();
-            subs = new ArrayList(subsSet);
+            Set<PlanetSubscriptionData> subsSet = getGroup().getSubscriptions();
+            
+            String absUrl = RollerRuntimeConfig.getAbsoluteContextURL();
+            
+            // iterate over list and build display list
+            subs = new ArrayList();
+            for( PlanetSubscriptionData sub : subsSet ) {
+                // only include external subs for display
+                if(!sub.getFeedURL().startsWith(absUrl)) {
+                    subs.add(sub);
+                }
+            }
         }
+        
         return subs;
     }
     



Mime
View raw message