]> git.plutz.net Git - shellwiki/commitdiff
url selection layout
authorPaul Hänsch <paul@plutz.net>
Wed, 11 May 2022 16:20:05 +0000 (18:20 +0200)
committerPaul Hänsch <paul@plutz.net>
Wed, 11 May 2022 16:20:05 +0000 (18:20 +0200)
attachment.sh
index.cgi

index 1981973d392359604c14c6d72c3ef479c1d295d8..3b6e6c565aed8b3171895c8115dc65e65e4d7209 100755 (executable)
@@ -117,7 +117,7 @@ elif [ "${PATH_INFO%/\[attachment\]/*}" != "${PATH_INFO}" ]; then
   else
     theme_404
   fi
-  exit 0;
+#  exit 0;
   
 elif [ "${PATH_INFO%/}" = "${PATH_INFO}" ]; then
   attpath="${PATH_INFO%/*}/#attachments/${PATH_INFO##*/}"
@@ -130,9 +130,7 @@ elif [ "${PATH_INFO%/}" = "${PATH_INFO}" ]; then
     FILE "$(attachment_convert "$_EXEC/pages/$attpath")"
   elif [ -d "$_DATA/pages/${PATH_INFO}" -o -d "$_EXEC/pages/${PATH_INFO}" ]; then
     REDIRECT "${_BASE}${PATH_INFO}/"
-  else
+  elif [ "${PATH_INFO%\[*\]}" = "${PATH_INFO}" ]; then
     theme_404
   fi
-  exit 0
-
 fi
index 90f7d776bf4540a219aa016c2d2f37c77a918c97..465a98994140c6b1919090333297ca10e0320eca 100755 (executable)
--- a/index.cgi
+++ b/index.cgi
@@ -74,23 +74,20 @@ case "${PATH_INFO}" in
   /"[.]"/*)
     FILE "${_EXEC}/${PATH_INFO#/\[.\]}"
     ;;
-  */\[*\]/) :;;
-  */)
+  /|*[^]]/)
     theme_page "${PATH_INFO}"
-    exit 0
     ;;
   */"[login]")
     theme_login
-    exit 0
     ;;
   */"[register]")
     theme_register
-    exit 0
     ;;
   */"#"*)
     :  # TODO: Invalid page name
     ;;
+  *)
+  . "$_EXEC/page_edit.sh"
+  . "$_EXEC/attachment.sh"
 esac
 
-. "$_EXEC/page_edit.sh"
-. "$_EXEC/attachment.sh"