r60883 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60882‎ | r60883 | r60884 >
Date:09:34, 10 January 2010
Author:aaron
Status:ok
Tags:
Comment:
Cleanup/fixes for r60759
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php
@@ -1689,17 +1689,18 @@
16901690 }
16911691
16921692 public static function addToHistLine( $history, $row, &$s, &$liClasses ) {
 1693+ $fa = FlaggedArticle::getArticleInstance( $history->getArticle() );
 1694+ if( !$fa->isReviewable() ) {
 1695+ return true; // nothing to do here
 1696+ }
16931697 $title = $history->getArticle()->getTitle();
1694 - if( !FlaggedRevs::isPageReviewable( $title ) ) {
1695 - return false; // nothing to do here
1696 - }
16971698 # Fetch and process cache the stable revision
16981699 if( !isset($history->fr_stableRevId) ) {
1699 - $frev = FlaggedRevision::newFromStable( $title );
 1700+ $frev = $fa->getStableRev();
17001701 $history->fr_stableRevId = $frev ? $frev->getRevId() : 0;
17011702 }
17021703 if( !$history->fr_stableRevId ) {
1703 - return false; // nothing to do here
 1704+ return true; // nothing to do here
17041705 }
17051706 // Unreviewed revision: highlight if pending
17061707 $link = $class = '';
@@ -1782,6 +1783,7 @@
17831784 return true;
17841785 }
17851786
 1787+ // diff=review param (bug 16923)
17861788 public static function checkDiffUrl( $titleObj, &$mOldid, &$mNewid, $old, $new ) {
17871789 if( $new === 'review' && isset($titleObj) ) {
17881790 $frev = FlaggedRevision::newFromStable( $titleObj );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r60759* Demark pending edits in history (color/msg/margin)...aaron01:18, 7 January 2010

Status & tagging log