From: Paul Hänsch Date: Sun, 21 May 2023 10:58:33 +0000 (+0200) Subject: no code: add comments warning about the mdfile override in translations handler X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=d2712691270f3b0a4a9829e8a0b4e36703929857;p=shellwiki no code: add comments warning about the mdfile override in translations handler --- diff --git a/acl.sh b/acl.sh index 0ba6663..1b25d5e 100755 --- a/acl.sh +++ b/acl.sh @@ -29,6 +29,8 @@ acl_collect(){ [ "$path" = / ] && break path="${path%/*/}/" + # Do not use `mdfile` function here because of specialties + # in translation handler (`handlers/10_translations.sh`) if [ -f "$_DATA/pages/$path/#page.md" ]; then pagefile="$_DATA/pages/$path/#page.md" elif [ -f "$_EXEC/pages/$path/#page.md" ]; then diff --git a/tools.sh b/tools.sh index de055fe..2e98d67 100755 --- a/tools.sh +++ b/tools.sh @@ -16,6 +16,11 @@ mdfile(){ # back to default page from installation local page="$(PATH "$1")" + # IMPORTANT: A Copy of this function exists + # in `handlers/10_translations.sh` + # Look into it now! + # Keep it synchronized, when changing anything + if [ -f "$_DATA/pages/$page/#page.md" ]; then printf %s\\n "$_DATA/pages/$page/#page.md" return 0