Make rc happy and comment work in progress code

This commit is contained in:
Uriel 2008-10-14 06:59:19 +02:00
parent 5dfce814f6
commit 351da977a9
2 changed files with 26 additions and 28 deletions

View file

@ -116,7 +116,7 @@ fn make_blog_post {
for(f in $bdir/$date-*) { for(f in $bdir/$date-*) {
i = `{echo $f | sed -n 's|^.*/'$date'-([0-9]+)_.*|\1|p'} i = `{echo $f | sed -n 's|^.*/'$date'-([0-9]+)_.*|\1|p'}
if(! ~ $#i 0 && test $i -ge $n) if(! ~ $#i 0 && test $i -ge $n)
n = `{hoc -e $i'+1'} n = `{hoc -e $i'+1'}
} }
title = `{echo $"title | sed 's/[ ]+/_/g; 1q'} title = `{echo $"title | sed 's/[ ]+/_/g; 1q'}
@ -126,27 +126,27 @@ fn make_blog_post {
# -------- # --------
#
app_blog_methods = ( _post index.rss ) #app_blog_methods = ( _post index.rss )
fn app_blog__post { #fn app_blog__post {
# echo
} #}
#
app_blog___default { #app_blog___default {
if (~ $blog # if (~ $blog)
call_app blogpost # call_app blogpost
} #}
#
# -- ## --
app_blogpost_methods = ( comment _edit ) #app_blogpost_methods = ( comment _edit )
#
fn app_blogpost_comment { #fn app_blogpost_comment {
call_app comments # call_app comments
}_ #}
#
# -- ## --
app_comments_methods = ( _post _edit ) #app_comments_methods = ( _post _edit )
#
fn app_comments___default { #fn app_comments___default {
#
} #}

View file

@ -251,9 +251,7 @@ if(test -f etc/initrc.local)
# Parse request URL # Parse request URL
uri = `{echo -n $REQUEST_URI | sed -e 's/\?.*//; s/'^$forbidden_uri_chars^'//g; s/\.\.*/./g;' -e '1q'} uri = `{echo -n $REQUEST_URI | sed -e 's/\?.*//; s/'^$forbidden_uri_chars^'//g; s/\.\.*/./g;' -e '1q'}
ifs='/' { ifs='/' { args = `{echo -n $uri} }
args = `{echo -n $uri}
}
if(! ~ $#debug 0) if(! ~ $#debug 0)