r26254 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r26253‎ | r26254 | r26255 >
Date:17:46, 30 September 2007
Author:aaron
Status:old
Tags:
Comment:
*Don't show the link for talk pages
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedArticle.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php
@@ -574,7 +574,8 @@
575575 public function isReviewable( $title ) {
576576 global $wgFlaggedRevsNamespaces;
577577
578 - return in_array($title->getNamespace(),$wgFlaggedRevsNamespaces);
 578+ return ( in_array($title->getNamespace(),$wgFlaggedRevsNamespaces)
 579+ && !$title->isTalkPage() );
579580 }
580581
581582 /**
Index: trunk/extensions/FlaggedRevs/FlaggedArticle.php
@@ -252,8 +252,11 @@
253253 }
254254
255255 function addVisibilityLink( $out ) {
256 - global $wgUser, $wgRequest, $action;
 256+ global $wgUser, $wgRequest, $wgTitle, $action;
257257
 258+ if( !$this->isReviewable( $wgTitle ) )
 259+ return true;
 260+
258261 if( $action=='protect' || $action=='unprotect' ) {
259262 # Check for an overridabe revision
260263 $tfrev = $this->getStableRev();

Status & tagging log