Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php |
— | — | @@ -668,7 +668,10 @@ |
669 | 669 | |
670 | 670 | return true; |
671 | 671 | } |
672 | | - |
| 672 | + |
| 673 | + /** |
| 674 | + * Inject stable links on LinksUpdate |
| 675 | + */ |
673 | 676 | public function extraLinksUpdate( $linksUpdate ) { |
674 | 677 | $fname = 'FlaggedRevs::extraLinksUpdate'; |
675 | 678 | wfProfileIn( $fname ); |
— | — | @@ -1311,7 +1314,7 @@ |
1312 | 1315 | global $wgRequest, $wgUser, $action, $wgFlaggedRevsAnonOnly, |
1313 | 1316 | $wgFlaggedRevsOverride, $wgFlaggedRevTabs; |
1314 | 1317 | // Get the subject page, not all skins have it :( |
1315 | | - if( !$wgFlaggedRevTabs || !isset($sktmp->mTitle) ) |
| 1318 | + if( !isset($sktmp->mTitle) ) |
1316 | 1319 | return true; |
1317 | 1320 | $title = $sktmp->mTitle->getSubjectPage(); |
1318 | 1321 | // Non-content pages cannot be validated |
— | — | @@ -1324,6 +1327,14 @@ |
1325 | 1328 | // No quality revs? Find the last reviewed one |
1326 | 1329 | if( !is_object($tfrev) ) |
1327 | 1330 | 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 | + } |
1328 | 1339 | // Note that revisions may not be set to override for users |
1329 | 1340 | if( $this->pageOverride() ) { |
1330 | 1341 | # Remove edit option altogether |
— | — | @@ -1383,7 +1394,7 @@ |
1384 | 1395 | } |
1385 | 1396 | # Reset static array |
1386 | 1397 | $content_actions = $new_actions; |
1387 | | - } else { |
| 1398 | + } else if( $wgFlaggedRevTabs ) { |
1388 | 1399 | // We are looking at the current revision |
1389 | 1400 | $new_actions = array(); $counter = 0; |
1390 | 1401 | # Straighten out order |
— | — | @@ -1552,7 +1563,7 @@ |
1553 | 1564 | * Same params for the sake of inheritance |
1554 | 1565 | * @returns Row |
1555 | 1566 | */ |
1556 | | - function getOverridingRev( $title = NULL, $getText=false ) { |
| 1567 | + function getOverridingRev( $title = NULL, $getText=false, $highPriority=false ) { |
1557 | 1568 | global $wgTitle; |
1558 | 1569 | |
1559 | 1570 | if( !is_null($title) && $title->getArticleID() != $wgTitle->getArticleID() ) |