X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=themes%2Fdefault.sh;h=3c5f2a1819a000277c06dc31451a2013f1335812;hb=12556f1bbca0a2a973c3cb305b191f3844f197cc;hp=0d60fb34a4144846925a50dbc54ebd716381e602;hpb=e80c289e4e82f70c9e7426c6c1d3c71c8a42046e;p=shellwiki diff --git a/themes/default.sh b/themes/default.sh index 0d60fb3..3c5f2a1 100755 --- a/themes/default.sh +++ b/themes/default.sh @@ -57,7 +57,7 @@ theme_page(){ } theme_editor(){ - local page="$1" title + local page="$1" template="$2" title title="${page%/}"; title="${title##*/}" if ! acl_write "$page"; then @@ -65,6 +65,8 @@ theme_editor(){ return 0 fi + [ "$template" ] && acl_read "$template" || template="$page" + # Important! Web Server response including newline printf "%s\r\n" "Content-Type: text/html; charset=utf-8" "" @@ -75,9 +77,10 @@ theme_editor(){ $(HTML "${title}") $(theme_header) -
+
- +