r118 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r117‎ | r118 | r119 >
Date:10:08, 11 February 2002
Author:magnus_manske
Status:old
Tags:
Comment:
sysop can now delete pages from edit form too (for redirect pages)
Modified paths:
  • /trunk/phpwiki/fpw/wikiPage.php (modified) (history)

Diff [purge]

Index: trunk/phpwiki/fpw/wikiPage.php
@@ -935,7 +935,7 @@
936936
937937 # This generates the QuickBar (also used by the list of special pages function)
938938 function getQuickBar () {
939 - global $wikiMainPage , $wikiRecentChanges , $wikiRecentChangesLink , $wikiUpload , $wikiPopularPages , $wikiLongPages;
 939+ global $wikiMainPage , $wikiRecentChanges , $wikiRecentChangesLink , $wikiUpload , $wikiPopularPages , $wikiLongPages , $action ;
940940 global $user , $oldID , $version , $wikiEditThisPage , $wikiDeleteThisPage , $wikiHistory , $wikiMyWatchlist , $wikiAskSQL ;
941941 global $wikiStatistics , $wikiNewPages , $wikiOrphans , $wikiMostWanted , $wikiAllPages , $wikiRandomPage , $wikiStubs , $wikiListUsers ;
942942 $editOldVersion = "" ;
@@ -945,12 +945,18 @@
946946 $column .= "<br><a href=\"".wikiLink("special:$wikiRecentChangesLink")."\">$wikiRecentChanges</a>\n" ;
947947 if ( $this->canEdit() ) $column .= "<br><a href=\"".wikiLink(urldecode($this->url)."$editOldVersion&action=edit")."\">$wikiEditThisPage</a>\n" ;
948948 else if ( !$this->isSpecialPage ) $column .= "<br>Protected page\n" ;
 949+
 950+ $temp = $this->isSpecialPage ;
 951+ if ( $action == "" ) $this->isSpecialPage = false ;
949952 if ( $this->canDelete() ) $column .= "<br><a href=\"".wikiLink("special:deletepage&target=".urldecode($this->url))."\">$wikiDeleteThisPage</a>\n" ;
 953+ $this->isSpecialPage = $temp ;
 954+
 955+
950956 if ( $this->canProtect() ) $column .= "<br><a href=\"".wikiLink("special:protectpage&target=".urldecode($this->url))."\">Protect this page</a>\n" ;
951957 # To be implemented later
952958 # if ( $this->canAdvance() ) $column .= "<br><a href=\"".wikiLink("special:Advance&topic=$this->safeTitle")."\">Advance</a>\n" ;
953959
954 - if ( in_array ( "is_sysop" , $user->rights ) ) $column .= "<br><a href=\"".wikiLink(urldecode("special:AskSQL"))."\">$wikiAskSQL</a>\n" ;
 960+ if ( in_array ( "is_sysop" , $user->rights ) ) $column .= "<br><a href=\"".wikiLink("special:AskSQL")."\">$wikiAskSQL</a>\n" ;
955961 if ( !$this->isSpecialPage ) $column .= "<br><a href=\"".wikiLink(urldecode($this->url)."&action=history")."\">$wikiHistory</a>\n" ;
956962 $column .= "<br><a href=\"".wikiLink("special:Upload")."\">$wikiUpload</a>\n" ;
957963 $column .= "<hr>" ;

Follow-up revisions

RevisionCommit summaryAuthorDate
r64472* updated css loading in remote/mediaWiki.js script...dale04:48, 1 April 2010

Status & tagging log