X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=index.cgi;h=9b38362b665dffae0b6a0f59286e0aff5d8da30e;hb=e52003a2f0aecacd91af213b8f5b777022d3a104;hp=76f1bef6a0062b6e71e6191a3feeb74bd990a7c2;hpb=5188614dbad08cce02ab53910d9252b0007f228f;p=shellwiki diff --git a/index.cgi b/index.cgi index 76f1bef..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" @@ -87,13 +86,8 @@ 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 ;; - */"[edit]") - theme_editor "${PATH_INFO%\[edit\]}" - ;; */"[login]") [ "$USER_NAME" ] \ && REDIRECT "./" \ @@ -102,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"