X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=handlers%2F40_revision.sh;h=e06a95b16843b256a3610a21aa41a03d0373d2a6;hb=391ca15c76ee74991dc8462ae76782497751a133;hp=1ab4649ef3c1ddc9a7db7d61621b3b5bc2abf760;hpb=359ef8d6a4d58d52ae3347d6390e4d4d535fb2d4;p=shellwiki diff --git a/handlers/40_revision.sh b/handlers/40_revision.sh index 1ab4649..e06a95b 100755 --- a/handlers/40_revision.sh +++ b/handlers/40_revision.sh @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2022 - 2023 Paul Hänsch +# Copyright 2022 - 2024 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 @@ -19,11 +19,12 @@ case "${PATH_INFO}" in REDIRECT "${_BASE}${PATH_INFO%/}" ;; */\[revision\]) - if ! acl_read "${PATH_INFO%\[revision\]}"; then + page="${PATH_INFO%\[revision\]}" + if ! acl_read "${page}"; then theme_error 403 else - "$_EXEC/macros/revisions" --list --diff "$page" \ - | theme_revisions - + "$_EXEC/macros/revisions" --list --diff "${page}" \ + | theme_revisions - "$(_ Revisions): ${PAGE_TITLE:-"${page##*/}"}" fi return 0 ;; @@ -40,7 +41,7 @@ case "${PATH_INFO}" in cd "${_DATA}/pages${page}" || cd "${_DATA}/pages/" git -C "${_DATA}" show "${rev}:pages${PATH_INFO}#page.md" \ | { printf '
'; md; printf '
'; } \ - | theme_page - "${page##*/}" + | theme_page - "${PAGE_TITLE:-"${page##*/}"} (${rev})" ) fi return 0