else
theme_404
fi
- exit 0;
+# exit 0;
elif [ "${PATH_INFO%/}" = "${PATH_INFO}" ]; then
attpath="${PATH_INFO%/*}/#attachments/${PATH_INFO##*/}"
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
/"[.]"/*)
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"