X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=index.cgi;h=9b38362b665dffae0b6a0f59286e0aff5d8da30e;hb=9f3c496629ba6140270523d9865f8be86c726db9;hp=2d4954f0c4cc55a1b3778fbebac4f00579afd965;hpb=77c6b2650f637948787357777172a91a305ce334;p=shellwiki diff --git a/index.cgi b/index.cgi index 2d4954f..9b38362 100755 --- 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"