shithub: werc

Download patch

ref: 23e9d829bc041a41f244f8c559f373206439dabd
parent: 3becc6544d4b491fd4818b16625ee2c5e8268e91
author: uriel <[email protected]>
date: Mon Jun 18 23:53:34 EDT 2007

Fix RSS feeds, this sucks and needs to be heavily reworked

--- a/bin/controller.rc
+++ b/bin/controller.rc
@@ -15,7 +15,7 @@
 template=_default
 sidebar=sidebar
 basedir=/gsoc/www
-baseuri=http://$site
+baseuri=http://$site/
 for(i in siteTitle siteSubTitle title extraHeaders)
     $i = ''
 
@@ -132,7 +132,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 ) {
+    if ( ! ~ $#blogDirs 0 && ! ~ $body */indexrss ) {
         inBlog = $blogDirs
         blogDirs = () 
     }
@@ -201,6 +201,10 @@
 	cat $headers $template | template
 	exit
 }
+
+if ( ~ $body */[bB]log/indexrss */[bB]log//indexrss && ~ $#blogDirs 0 )
+    blogDirs = `{basename -d $body}
+
 
 uri = `{echo $uri | sed 's/indexrss$//'}
 uri=$baseuri$"uri