shithub: werc

Download patch

ref: 1a1f166f307fc752ddb5223f52af2734cd08f6f7
parent: 878f3675d5e27ff896063018df8c28a054e899d1
author: uriel <uriel@engel.se.cat-v.org>
date: Wed Jun 13 07:58:22 EDT 2007

Don't cascade blogDirs setting into individual blog dir items

--- a/bin/controller.rc
+++ b/bin/controller.rc
@@ -80,7 +80,7 @@
     if not if ( test -f $body.html )
         cat $body.html | /bin/sed '0,/<body>/d; /<\/body>/,$d' 
     if not if (~ $body *.html && test -f $body )
-        sed '0,/<body>/d;/<\/body>/,$d' < $body
+        cat $body | /bin/sed -i '0,/<body[^>]*>/d;/<\/body>/,$d' 
     if not if ( ~ $body */[bB]log/index */[bB]log//index && ~ $#blogDirs 0 )
         blogDirs = `{basename -d $body}
     if not if(~ $body */index && ~ $#blogDirs 0) {
@@ -119,6 +119,7 @@
 fpath=$sitedir
 for ( i in '' $args ) {
     fpath = $fpath/$i
+    blogDirs = () # We don't want blog settings to cascade into posts
     if ( test -f $fpath/_config )
         . $fpath/_config
 }