]> git.plutz.net Git - shellwiki/blobdiff - index.cgi
basic attachment upload
[shellwiki] / index.cgi
index 2d4954f0c4cc55a1b3778fbebac4f00579afd965..9b38362b665dffae0b6a0f59286e0aff5d8da30e 100755 (executable)
--- a/index.cgi
+++ b/index.cgi
@@ -1,7 +1,6 @@
 #!/bin/sh
 
 . "${_EXEC:-${0%/*}}/cgilite/cgilite.sh"
-set -- nocookie
 . "${_EXEC}/cgilite/session.sh"
 . "${_EXEC}/cgilite/file.sh"
 . "${_EXEC}/cgilite/users.sh"
@@ -79,8 +78,6 @@ attachment() {
   fi
 }
 
-. "$_EXEC/page_edit.sh"
-
 case "${PATH_INFO}" in
   /"[.]"/*)
     FILE "${_EXEC}/${PATH_INFO#/\[.\]}"
@@ -89,8 +86,6 @@ case "${PATH_INFO}" in
     if [ -f "$_DATA/pages/$PATH_INFO/#page.md" \
       -o -f "$_EXEC/pages/$PATH_INFO/#page.md" ]; then
       theme_page "${PATH_INFO}"
-    else
-      theme_404
     fi
     ;;
   */"[login]")
@@ -101,13 +96,10 @@ case "${PATH_INFO}" in
   */"[register]")
     theme_register
     ;;
-  */"[attachment]"/*)
-    :  # TODO: Original attachment file
-    ;;
   */"#"*)
     :  # TODO: Invalid page name
     ;;
-  *)
-    attachment "${PATH_INFO}"
-    ;;
 esac
+
+. "$_EXEC/page_edit.sh"
+. "$_EXEC/attachment.sh"