]> git.plutz.net Git - shellwiki/blobdiff - index.cgi
page selector layout
[shellwiki] / index.cgi
index 465a98994140c6b1919090333297ca10e0320eca..bb9a914ca834ffaa9d9e2864ed7ca863ca71933a 100755 (executable)
--- a/index.cgi
+++ b/index.cgi
@@ -74,20 +74,26 @@ case "${PATH_INFO}" in
   /"[.]"/*)
     FILE "${_EXEC}/${PATH_INFO#/\[.\]}"
     ;;
+  */"#"*/*)
+    export ERROR_MSG="This page name is not allowed"
+    theme_400
+    ;;
   /|*[^]]/)
     theme_page "${PATH_INFO}"
     ;;
   */"[login]")
-    theme_login
+    theme_page "/[wiki]/login/"
     ;;
   */"[register]")
-    theme_register
+    theme_page "/[wiki]/register/"
     ;;
-  */"#"*)
-    :  # TODO: Invalid page name
+  */"[invite]")
+    theme_page "/[wiki]/invite/"
     ;;
   *)
-  . "$_EXEC/page_edit.sh"
-  . "$_EXEC/attachment.sh"
+    . "$_EXEC/page_edit.sh" \
+    || . "$_EXEC/attachment.sh" \
+    || theme_404
+    ;;
 esac