]> git.plutz.net Git - busy/commitdiff
honor login status when directing to lock script
authorpaul <paul@plutz.net>
Sun, 30 Oct 2011 19:52:46 +0000 (19:52 +0000)
committerpaul <paul@plutz.net>
Sun, 30 Oct 2011 19:52:46 +0000 (19:52 +0000)
svn path=/trunk/; revision=25

Wiki.page

index 49d4687b2ba255df85f00e5e2f2bb38569a342b3..c8034897b2bce641e788fe81ec0bf3453af648c5 100755 (executable)
--- a/Wiki.page
+++ b/Wiki.page
@@ -70,10 +70,10 @@ elif [ -n "$info" -a -r "Wiki/${info}${rev}" ]; then
         done) <a class='rev' href='?p=Wiki&amp;i=$info'>Latest</a><br>
       <hr>
       $($LOGIN && if [ -z "$lock" ]; then
-          [ -z "$rev" ] && echo "<a class='function' href='write/lock.cgi?p=Wiki&amp;e=$info'>edit this page</a>"
-         [ -n "$rev" ] && echo "Click <a class='function' href='write/lock.cgi?p=Wiki&amp;e=${info}&amp;r=${rev:s/.//}'>edit</a> to derive a new page revision from this one."
+          [ -z "$rev" ] && echo "<a class='function' href='write/$($LOGIN && echo user_)lock.cgi?p=Wiki&amp;e=$info'>edit this page</a>"
+         [ -n "$rev" ] && echo "Click <a class='function' href='write/$($LOGIN && echo user_)lock.cgi?p=Wiki&amp;e=${info}&amp;r=${rev:s/.//}'>edit</a> to derive a new page revision from this one."
         else
-         echo "<b>This page is currently being edited by $lock</b><a class='function' href='write/lock.cgi?p=Wiki&amp;e=$info'>edit anyway</a>"
+         echo "<b>This page is currently being edited by $lock</b><a class='function' href='write/$($LOGIN && echo user_)lock.cgi?p=Wiki&amp;e=$info'>edit anyway</a>"
         fi
         $LOGIN && echo '<hr>')
       <h1>Table of Content</h1>