X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=handlers%2F20_title.sh;h=3da07fffab3ed2df4ad141ae2a0c88993143945d;hb=3c949f9f02cddc9d1cd30174342aae1d58175999;hp=4288b31de21ed086a726c4d54781d11d0500e2fc;hpb=1bc3367c9a1a5eb725688802927bd544cc9d9c63;p=shellwiki diff --git a/handlers/20_title.sh b/handlers/20_title.sh index 4288b31..3da07ff 100755 --- a/handlers/20_title.sh +++ b/handlers/20_title.sh @@ -1,6 +1,20 @@ #!/bin/sh -if acl_read ${PATH_INFO%/*}; then +# Copyright 2023 Paul Hänsch +# +# Permission to use, copy, modify, and/or distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +# SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +# IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +if acl_read ${PATH_INFO}; then mdfile="$(mdfile "${PATH_INFO%/*}")" else PAGE_TITLE="${SITE_TITLE}" @@ -29,10 +43,10 @@ fi case $PATH_INFO in *"/[attachment]") - PAGE_TITLE="${PAGE_TITLE} (Attachments)" + PAGE_TITLE="${PAGE_TITLE} ($(_ Attachments))" ;; *"/[revision]") - PAGE_TITLE="${PAGE_TITLE} (Revisions)" + PAGE_TITLE="${PAGE_TITLE} ($(_ Revisions))" ;; esac