Fix blagh_init to fail when we should fail.

This commit is contained in:
Uriel 2008-12-28 23:43:15 +01:00
parent 0ab4235b09
commit 56a5fd5fa6

View file

@ -1,13 +1,14 @@
fn blagh_init { fn blagh_init {
if(~ $#blaghDirs 0 && ~ $req_path */[bB]log/index) if(~ $#blaghDirs 0 && ~ $local_path */[bB]log/index*)
blaghDirs=( . ) blaghDirs=( . )
# Should not match sub-dirs! # Should not match sub-dirs!
if(! ~ $#blaghDirs 0) { if(! ~ $#blaghDirs 0) {
# && test -d / `{echo '-a -d '^$req_path^$blaghDirs} # && test -d / `{echo '-a -d '^$req_path^$blaghDirs}
blagh_uri=`{echo $req_path|sed 's/index\.(atom|rss)$//'} blagh_uri=`{echo $req_path|sed 's/index(\.(atom|rss))?$//'}
blagh_url=$base_uri^$blagh_root_path blagh_url=$base_uri^$blagh_root_path
blagh_root=$sitedir^$blagh_uri blagh_root=$sitedir^$blagh_uri
dprint $blagh_root
if(~ $req_path */[0-9][0-9][0-9][0-9]/ */[0-9][0-9][0-9][0-9]/[0-9][0-9]/ */[0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9]/) if(~ $req_path */[0-9][0-9][0-9][0-9]/ */[0-9][0-9][0-9][0-9]/[0-9][0-9]/ */[0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9]/)
status='Use default handler' status='Use default handler'
@ -30,9 +31,9 @@ fn blagh_init {
dprint XXXX $req_path dprint XXXX $req_path
} }
}
status=() status=()
} }
}
fn blagh_body { fn blagh_body {
for(p in `{get_post_list $blagh_root^$blaghDirs}) { for(p in `{get_post_list $blagh_root^$blaghDirs}) {