X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=handlers%2F10_page.sh;h=f8cbbafaae166c9f141af7d548c18f3a5cba47b5;hb=4176213eafe0118f19fc492b3bfa5f23efa4acb0;hp=edb849ab24acb12b7ea644c8572768be404535f6;hpb=ba872f126aa9416899b7114f8695f84ebbae6925;p=shellwiki diff --git a/handlers/10_page.sh b/handlers/10_page.sh index edb849a..f8cbbaf 100755 --- a/handlers/10_page.sh +++ b/handlers/10_page.sh @@ -1,6 +1,7 @@ #!/bin/sh . "$_EXEC/cgilite/file.sh" +. "$_EXEC/css.sh" CACHE_AGE=${CACHE_AGE:-300} export MD_MACROS="$_EXEC/macros" @@ -56,11 +57,12 @@ case "${PATH_INFO}" in return 1 ;; */) - if [ ! "$(mdfile "$page")" ]; then + if [ ! "$(mdfile "$PATH_INFO")" ]; then theme_error 404 - elif ! acl_read "$page"; then + elif ! acl_read "$PATH_INFO"; then theme_error 403 else + PAGE_CSS="$(css "${PATH_INFO}")" theme_page "${PATH_INFO}" fi return 0