r98441 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98440‎ | r98441 | r98442 >
Date:20:25, 29 September 2011
Author:aaron
Status:ok
Tags:
Comment:
Avoid use of HistoryPager::getArticle()
Modified paths:
  • /trunk/extensions/FlaggedRevs/presentation/FlaggedRevsUI.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/presentation/FlaggedRevsUI.hooks.php
@@ -325,7 +325,7 @@
326326 }
327327
328328 public static function addToHistQuery( HistoryPager $pager, array &$queryInfo ) {
329 - $flaggedArticle = FlaggedPage::getArticleInstance( $pager->getArticle() );
 329+ $flaggedArticle = FlaggedPage::getTitleInstance( $pager->getTitle() );
330330 # Non-content pages cannot be validated. Stable version must exist.
331331 if ( $flaggedArticle->isReviewable() && $flaggedArticle->getStableRev() ) {
332332 # Highlight flaggedrevs
@@ -416,7 +416,7 @@
417417 }
418418
419419 public static function addToHistLine( HistoryPager $history, $row, &$s, &$liClasses ) {
420 - $fa = FlaggedPage::getArticleInstance( $history->getArticle() );
 420+ $fa = FlaggedPage::getTitleInstance( $history->getTitle() );
421421 if ( !$fa->isReviewable() ) {
422422 return true; // nothing to do here
423423 }
@@ -431,7 +431,7 @@
432432 if ( !$history->fr_stableRevId ) {
433433 return true; // nothing to do here
434434 }
435 - $title = $history->getArticle()->getTitle();
 435+ $title = $history->getTitle();
436436 $revId = (int)$row->rev_id;
437437 // Pending revision: highlight and add diff link
438438 $link = $class = '';

Status & tagging log