roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r263881 - /incubator/roller/branches/roller_2.0/src/org/roller/presentation/tags/menu/RollerMenuModel.java
Date Sun, 28 Aug 2005 14:46:19 GMT
Author: snoopdave
Date: Sun Aug 28 07:46:16 2005
New Revision: 263881

URL: http://svn.apache.org/viewcvs?rev=263881&view=rev
Log:
Fixed current-website related  bugs in file upload and theme editor

Modified:
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/tags/menu/RollerMenuModel.java

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/tags/menu/RollerMenuModel.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/tags/menu/RollerMenuModel.java?rev=263881&r1=263880&r2=263881&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/tags/menu/RollerMenuModel.java
(original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/tags/menu/RollerMenuModel.java
Sun Aug 28 07:46:16 2005
@@ -12,9 +12,9 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.roller.RollerException;
-import org.roller.pojos.UserData;
+import org.roller.pojos.WebsiteData;
+import org.roller.presentation.BasePageModel;
 import org.roller.presentation.RollerRequest;
-import org.roller.presentation.RollerSession;
 import org.xml.sax.SAXException;
 
 //////////////////////////////////////////////////////////////////////////////
@@ -162,11 +162,17 @@
 		RollerRequest rreq = RollerRequest.getRollerRequest(req);
 		try
 		{
-            if (rreq.getWebsite() != null) 
+            WebsiteData website = rreq.getWebsite();
+            BasePageModel pageModel = (BasePageModel)req.getAttribute("model");
+            if (website == null && pageModel != null) 
             {
-                params.put(RollerRequest.WEBLOG_KEY, rreq.getWebsite().getHandle());
+                website = pageModel.getWebsite();              
             }
-		}
+            if (website != null)
+            {
+                params.put(RollerRequest.WEBLOG_KEY, website.getHandle());
+            }
+        }
 		catch (Exception e)
 		{
 			mLogger.error("ERROR getting user in menu model", e);



Mime
View raw message