]> git.plutz.net Git - shellwiki/blobdiff - handlers/90_brackets.sh
allow page content from stdin for easyer theming of special pages
[shellwiki] / handlers / 90_brackets.sh
index b6b25383f32b4d58e000ac110e3cb0d0b45b64e5..f509294c69f470217dc7adc32a8d6844bc7da45e 100755 (executable)
@@ -5,7 +5,13 @@
 
 case "${PATH_INFO}" in
   */\[*\]/*)
-    theme_page "${PATH_INFO}"
+    if [ ! "$(mdfile "${PATH_INFO}")" ]; then
+      theme_error 404
+    elif ! acl_read "${PATH_INFO}"; then
+      theme_error 403
+    else
+      theme_page "${PATH_INFO}"
+    fi
     return 0
     ;;
 esac