shithub: werc

Download patch

ref: 31820fabb6da1f4c8e0d6bb11ec7d849fe91c1db
parent: 3181823b0299aea5d01caea2c23db9cf9e4a071b
author: uriel <uriel@vm41.cat-v.org>
date: Fri Jun 12 19:56:48 EDT 2009

Optimization/fix to only pass the content of all blog posts at once to $formatter
This seems to some how fix a strange bug I have seen on my test setup, need to investigate more.

--- a/apps/blagh/app.rc
+++ b/apps/blagh/app.rc
@@ -68,9 +68,11 @@
 
     echo '<div style="text-align:right">(<a href="index.rss">RSS Feed</a>|<a href="index.atom">Atom Feed</a>)</div>'
 
+    { # XXX Not sure why this fixes issues with blog setup, probably bug in fltr_cache!
     for(p in `{get_post_list $blagh_root^$blagh_dirs}) {
         l=`{echo -n $p|sed 's!'$sitedir^'/?(.*)([0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9])(/[^/]+/)!\2 /\1\2\3!'}
         sed '1s!.*![&]('^$l(2)^') ('^$l(1)^')!' < $p/index.md 
+    }
     } | $formatter 
 }