X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=handlers%2F90_brackets.sh;h=ce49b0e9a36fd9456d74d99950da40609f5d5a1d;hb=2bf03aa546d241307bc05d5f2fe101ef67726970;hp=dadd6445f663c80abb3a03d3ed9e6bd5c570d121;hpb=ba872f126aa9416899b7114f8695f84ebbae6925;p=shellwiki diff --git a/handlers/90_brackets.sh b/handlers/90_brackets.sh index dadd644..ce49b0e 100755 --- a/handlers/90_brackets.sh +++ b/handlers/90_brackets.sh @@ -6,8 +6,12 @@ # attachment and edit (and really all) handlers should take precedence case "${PATH_INFO}" in + */\[view\]) + # explicit view handler for linking + REDIRECT "${_BASE}${PATH_INFO%\[view\]}" + ;; */) - if [ ! "$(mdfile "${PATH_INFO}")" ]; then + if ! mdfile "${PATH_INFO}" >&-; then theme_error 404 elif ! acl_read "${PATH_INFO}"; then theme_error 403