shithub: werc

Download patch

ref: 9212f4b6fd7b70d0b444c00b12322e975bbf43b0
parent: 2845f7d97215174132a9da0f657b2715cad558ba
author: uriel <uriel@engel.se.cat-v.org>
date: Tue Oct 21 12:37:16 EDT 2008

New req_path var

--- a/bin/controller.rc
+++ b/bin/controller.rc
@@ -247,10 +247,10 @@
         perm_redirect `{ echo $REQUEST_URI | sed 's,/index$,/,' }
         
     pageTitle=`{echo $args | sed -e 's/ / - /g' -e 's/_/ /g'}
-    body=$uri
+    req_path=$uri
 }
 if not {
-    body='/'
+    req_path='/'
 }
 
 fpath=$sitedir
@@ -257,7 +257,7 @@
 for (i in ('' $args)) {
     fpath = $fpath/$i
     # We don't want blog settings to cascade into posts, note that we are inBlog instead
-    if (! ~ $#blogDirs 0 && ! ~ $body */index.rss */[bB]log */[bB]log/) {
+    if (! ~ $#blogDirs 0 && ! ~ $req_path */index.rss */[bB]log */[bB]log/) {
         inBlog = $blogDirs
         blogDirs = () 
     }
@@ -290,7 +290,7 @@
 	pageTitle=$"pageTitle^' | '^$"siteTitle^' '^$"siteSubTitle
 
 
-body=$sitedir/$body
+body=$sitedir/$req_path
 if (test -d $body) {
     if(! ~ $body */)
     	perm_redirect $REQUEST_URI^'/'