r24867 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r24866‎ | r24867 | r24868 >
Date:01:37, 17 August 2007
Author:aaron
Status:old
Tags:
Comment:
*Tab fix
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php
@@ -668,7 +668,10 @@
669669
670670 return true;
671671 }
672 -
 672+
 673+ /**
 674+ * Inject stable links on LinksUpdate
 675+ */
673676 public function extraLinksUpdate( $linksUpdate ) {
674677 $fname = 'FlaggedRevs::extraLinksUpdate';
675678 wfProfileIn( $fname );
@@ -1311,7 +1314,7 @@
13121315 global $wgRequest, $wgUser, $action, $wgFlaggedRevsAnonOnly,
13131316 $wgFlaggedRevsOverride, $wgFlaggedRevTabs;
13141317 // Get the subject page, not all skins have it :(
1315 - if( !$wgFlaggedRevTabs || !isset($sktmp->mTitle) )
 1318+ if( !isset($sktmp->mTitle) )
13161319 return true;
13171320 $title = $sktmp->mTitle->getSubjectPage();
13181321 // Non-content pages cannot be validated
@@ -1324,6 +1327,14 @@
13251328 // No quality revs? Find the last reviewed one
13261329 if( !is_object($tfrev) )
13271330 return true;
 1331+ if( !$wgFlaggedRevTabs ) {
 1332+ if( $this->pageOverride() ) {
 1333+ # Remove edit option altogether
 1334+ unset( $content_actions['edit']);
 1335+ unset( $content_actions['viewsource']);
 1336+ }
 1337+ return true;
 1338+ }
13281339 // Note that revisions may not be set to override for users
13291340 if( $this->pageOverride() ) {
13301341 # Remove edit option altogether
@@ -1383,7 +1394,7 @@
13841395 }
13851396 # Reset static array
13861397 $content_actions = $new_actions;
1387 - } else {
 1398+ } else if( $wgFlaggedRevTabs ) {
13881399 // We are looking at the current revision
13891400 $new_actions = array(); $counter = 0;
13901401 # Straighten out order
@@ -1552,7 +1563,7 @@
15531564 * Same params for the sake of inheritance
15541565 * @returns Row
15551566 */
1556 - function getOverridingRev( $title = NULL, $getText=false ) {
 1567+ function getOverridingRev( $title = NULL, $getText=false, $highPriority=false ) {
15571568 global $wgTitle;
15581569
15591570 if( !is_null($title) && $title->getArticleID() != $wgTitle->getArticleID() )

Status & tagging log