roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agillil...@apache.org
Subject svn commit: r424500 - /incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/PageServlet.java
Date Sat, 22 Jul 2006 00:00:36 GMT
Author: agilliland
Date: Fri Jul 21 17:00:35 2006
New Revision: 424500

URL: http://svn.apache.org/viewvc?rev=424500&view=rev
Log:
hidden pages are a 404.


Modified:
    incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/PageServlet.java

Modified: incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/PageServlet.java
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/PageServlet.java?rev=424500&r1=424499&r2=424500&view=diff
==============================================================================
--- incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/PageServlet.java
(original)
+++ incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/PageServlet.java
Fri Jul 21 17:00:35 2006
@@ -201,11 +201,7 @@
             
         // If request specified the page, then go with that
         } else if (pageRequest.getWeblogPageName() != null) {
-            try {
-                page = weblog.getPageByLink(pageRequest.getWeblogPageName());
-            } catch(Exception e) {
-                log.error("Error getting page: "+pageRequest.getWeblogPageName(), e);
-            }
+            page = pageRequest.getWeblogPage();
             
         // If page not available from request, then use weblog's default
         } else {
@@ -227,6 +223,9 @@
         
         // validation
         boolean invalid = false;
+        if(page.isHidden()) {
+            invalid = true;
+        }
         if(pageRequest.getLocale() != null) {
             
             // locale view only allowed if weblog has enabled it
@@ -234,7 +233,8 @@
                 invalid = true;
             }
             
-        } else if(pageRequest.getWeblogAnchor() != null) {
+        }
+        if(pageRequest.getWeblogAnchor() != null) {
             
             // permalink specified.  entry must exist and locale must match
             if(pageRequest.getWeblogEntry() == null) {



Mime
View raw message