New req_path var
This commit is contained in:
parent
34a99124a9
commit
f24f05896d
1 changed files with 4 additions and 4 deletions
|
|
@ -247,17 +247,17 @@ if (! ~ $args '') {
|
||||||
perm_redirect `{ echo $REQUEST_URI | sed 's,/index$,/,' }
|
perm_redirect `{ echo $REQUEST_URI | sed 's,/index$,/,' }
|
||||||
|
|
||||||
pageTitle=`{echo $args | sed -e 's/ / - /g' -e 's/_/ /g'}
|
pageTitle=`{echo $args | sed -e 's/ / - /g' -e 's/_/ /g'}
|
||||||
body=$uri
|
req_path=$uri
|
||||||
}
|
}
|
||||||
if not {
|
if not {
|
||||||
body='/'
|
req_path='/'
|
||||||
}
|
}
|
||||||
|
|
||||||
fpath=$sitedir
|
fpath=$sitedir
|
||||||
for (i in ('' $args)) {
|
for (i in ('' $args)) {
|
||||||
fpath = $fpath/$i
|
fpath = $fpath/$i
|
||||||
# We don't want blog settings to cascade into posts, note that we are inBlog instead
|
# We don't want blog settings to cascade into posts, note that we are inBlog instead
|
||||||
if (! ~ $#blogDirs 0 && ! ~ $body */index.rss */[bB]log */[bB]log/) {
|
if (! ~ $#blogDirs 0 && ! ~ $req_path */index.rss */[bB]log */[bB]log/) {
|
||||||
inBlog = $blogDirs
|
inBlog = $blogDirs
|
||||||
blogDirs = ()
|
blogDirs = ()
|
||||||
}
|
}
|
||||||
|
|
@ -290,7 +290,7 @@ if not
|
||||||
pageTitle=$"pageTitle^' | '^$"siteTitle^' '^$"siteSubTitle
|
pageTitle=$"pageTitle^' | '^$"siteTitle^' '^$"siteSubTitle
|
||||||
|
|
||||||
|
|
||||||
body=$sitedir/$body
|
body=$sitedir/$req_path
|
||||||
if (test -d $body) {
|
if (test -d $body) {
|
||||||
if(! ~ $body */)
|
if(! ~ $body */)
|
||||||
perm_redirect $REQUEST_URI^'/'
|
perm_redirect $REQUEST_URI^'/'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue