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=''
<a name="$info" href="/?p=Wiki&i=$info"><h1>$title</h1></a>
$description<br><br>
<a class="function" href="/?p=Wiki&i=$info">View</a>
- $($LOGIN && echo "<a class='function' href='#' onclick=\"javascript:show_screen('change_$info');hide_screen('display_$info');\">Change Info</a>")
+ $($ACL_WIKIEDIT && echo "<a class='function' href='#' onclick=\"javascript:show_screen('change_$info');hide_screen('display_$info');\">Change Info</a>")
</div>
WikiEND
- $LOGIN && cat <<WikiEND
+ $ACL_WIKIEDIT && cat <<WikiEND
<div id="change_$info" style="display: none;">
- <form action="/write/wikimeta.cgi?i=$info" method="post" accept-charset="UTF-8">
+ <form action="/write/$($LOGIN && echo user_)wikimeta.cgi?i=$info" method="post" accept-charset="UTF-8">
<b>Title:</b> <input type="text" name="title" value="$title"><br>
<b>Description:</b><br>
<textarea name="desc" rows="6" style="width:100%;">$description</textarea><br>