You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by sn...@apache.org on 2005/09/20 23:21:22 UTC
svn commit: r290566 - in
/incubator/roller/branches/roller_2.0/src/org/roller/presentation/velocity:
ContextLoader.java PageModel.java
Author: snoopdave
Date: Tue Sep 20 14:21:17 2005
New Revision: 290566
URL: http://svn.apache.org/viewcvs?rev=290566&view=rev
Log:
Fix for ROL-816, draft entries available by permalink
Modified:
incubator/roller/branches/roller_2.0/src/org/roller/presentation/velocity/ContextLoader.java
incubator/roller/branches/roller_2.0/src/org/roller/presentation/velocity/PageModel.java
Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/velocity/ContextLoader.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/velocity/ContextLoader.java?rev=290566&r1=290565&r2=290566&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/velocity/ContextLoader.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/velocity/ContextLoader.java Tue Sep 20 14:21:17 2005
@@ -233,8 +233,11 @@
list.add(CommentDataWrapper.wrap(cd));
ctx.put("previewComments",list);
}
+
WeblogEntryData entry = rreq.getWeblogEntry();
- ctx.put("entry", WeblogEntryDataWrapper.wrap(entry));
+ if (entry.getStatus().equals(WeblogEntryData.PUBLISHED)) {
+ ctx.put("entry", WeblogEntryDataWrapper.wrap(entry));
+ }
}
//------------------------------------------------------------------------
Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/velocity/PageModel.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/velocity/PageModel.java?rev=290566&r1=290565&r2=290566&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/velocity/PageModel.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/velocity/PageModel.java Tue Sep 20 14:21:17 2005
@@ -663,7 +663,7 @@
{
WeblogEntryData entry = mRollerReq.getWeblogEntry();
- if(entry != null)
+ if(entry != null && entry.getStatus().equals(WeblogEntryData.PUBLISHED))
return WeblogEntryDataWrapper.wrap(entry);
else
return null;