r44742 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44741‎ | r44742 | r44743 >
Date:23:56, 17 December 2008
Author:aaron
Status:deferred
Tags:
Comment:
Remove now-redundant patrol link
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedArticle.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedArticle.php
@@ -738,31 +738,6 @@
739739 return true;
740740 }
741741
742 - /*
743 - * Adds a patrol link to non-reviewable pages
744 - */
745 - public function addPatrolLink( &$outputDone, &$pcache ) {
746 - global $wgRequest, $wgOut, $wgUser;
747 - # For unreviewable pages, allow for basic patrolling
748 - if( !$this->isPatrollable() ) {
749 - return true;
750 - }
751 - # If we have been passed an &rcid= parameter, we want to give the user a
752 - # chance to mark this new article as patrolled.
753 - $rcid = $wgRequest->getIntOrNull( 'rcid' );
754 - if( !empty($rcid) && $wgUser->isAllowed( 'review' ) ) {
755 - wfLoadExtensionMessages( 'FlaggedRevs' );
756 - $reviewTitle = SpecialPage::getTitleFor( 'RevisionReview' );
757 - $token = $wgUser->editToken( $this->parent->getTitle()->getPrefixedText(), $rcid );
758 - $link = $wgUser->getSkin()->makeKnownLinkObj( $reviewTitle, wfMsgHtml('markaspatrolledtext'),
759 - wfArrayToCGI( array( 'patrolonly' => 1, 'target' => $this->parent->getTitle()->getPrefixedDBKey(),
760 - 'rcid' => $rcid, 'token' => $token ) )
761 - );
762 - # Add the link...
763 - $wgOut->addHTML( "<div class='patrollink'>" . wfMsgHtml('markaspatrolledlink',$link) . '</div>' );
764 - }
765 - return true;
766 - }
767742 /**
768743 * Add link to stable version setting to protection form
769744 */
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php
@@ -1095,7 +1095,6 @@
10961096 $flaggedArticle->maybeUpdateMainCache( $outputDone, $pcache );
10971097 $flaggedArticle->addStableLink( $outputDone, $pcache );
10981098 $flaggedArticle->setPageContent( $outputDone, $pcache );
1099 - $flaggedArticle->addPatrolLink( $outputDone, $pcache );
11001099 return true;
11011100 }
11021101

Status & tagging log