X-Git-Url: http://git.plutz.net/?a=blobdiff_plain;f=Wiki.page;h=c8034897b2bce641e788fe81ec0bf3453af648c5;hb=12aa6348efa2b8cd6ccf2b7cb007ea9c31573756;hp=490966367705b8b8d744062aa4e6aa007612c0a3;hpb=44407376a39cd71f292875c4d09214277110d724;p=busy diff --git a/Wiki.page b/Wiki.page index 4909663..c803489 100755 --- a/Wiki.page +++ b/Wiki.page @@ -6,6 +6,8 @@ rev="$(egrep -o '(^|&)(r=)[0-9]{10}(&|$)' <<<"${QUERY_STRING}" |tr -d '&r=')" search="$(egrep -o '(^|&)(s=).+(&|$)' <<<"${QUERY_STRING}" |sed -r 's:^&?s=::;s:\+: :g;s:%:\\x:g')" search="$(echo -e "${search}" |sed 's:\t: :g;s:\r::g;s:\\:\\\\:g' |head -n1)" +[ -z "$ACL_WIKIEDIT" ] && ACL_WIKIEDIT=false + [ -n "$rev" ] && rev=".$rev" if [ -n "$search" ]; then info='' @@ -21,10 +23,10 @@ else lock="$(cut -d: -f1 "$lock")" fi -if [ -n "$edit" -a -r "Wiki/$edit" ]; then +if [ -n "$edit" -a -r "Wiki/${edit}${rev}" ]; then title="$(egrep -x 'title=.+' "Wiki/$edit.meta" |cut -d= -f2- || echo '(Untitled)')" cat < +
Editing $title
@@ -34,7 +36,7 @@ if [ -n "$edit" -a -r "Wiki/$edit" ]; then

$title

- +
@@ -67,10 +69,11 @@ elif [ -n "$info" -a -r "Wiki/${info}${rev}" ]; then rno=$(($rno+1)) done) Latest

- $($LOGIN && [ -z "$rev" ] && if [ -z "$lock" ]; then - echo "edit this page" + $($LOGIN && if [ -z "$lock" ]; then + [ -z "$rev" ] && echo "edit this page" + [ -n "$rev" ] && echo "Click edit to derive a new page revision from this one." else - echo "This page is currently being edited by $lockedit anyway" + echo "This page is currently being edited by $lockedit anyway" fi $LOGIN && echo '
')

Table of Content

@@ -99,7 +102,7 @@ WikiEND $LOGIN && cat <Comment / Ask