You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-scm@portals.apache.org by cd...@apache.org on 2006/08/29 06:30:27 UTC

svn commit: r437959 - /portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/RenderConfig.java

Author: cdoremus
Date: Mon Aug 28 21:30:26 2006
New Revision: 437959

URL: http://svn.apache.org/viewvc?rev=437959&view=rev
Log:
Applied patch submitted by Charles Severence in PLUTO-251. Thank you!!

Modified:
    portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/RenderConfig.java

Modified: portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/RenderConfig.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/RenderConfig.java?rev=437959&r1=437958&r2=437959&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/RenderConfig.java (original)
+++ portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/RenderConfig.java Mon Aug 28 21:30:26 2006
@@ -82,7 +82,20 @@
             }
             pageId = defaultPageId;
         }
-        return (PageConfig) pages.get(pageId);
+//        return (PageConfig) pages.get(pageId);
+         
+         // TODO: Make sure this is needed. 
+         //This is the PLUTO-251 fix submitted by Charles Severence. Thank you!!!
+         // Sometimes pages come with a prefix of a slash - if the page is not 
+         // found, and the first character of the pageId is a slash we attempt 
+         // to look up the page without the slash. 
+         
+         PageConfig retval = (PageConfig) pages.get(pageId); 
+         
+         if ( retval == null && pageId.startsWith("/") && pageId.length() > 2 ) { 
+        	 retval = (PageConfig) pages.get(pageId.substring(1)); 
+         } 
+         return retval; 
     }
 
     public void addPage(PageConfig config) {