r57183 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r57182‎ | r57183 | r57184 >
Date:02:05, 1 October 2009
Author:aaron
Status:ok
Tags:
Comment:
Fixed bogus (review) links in RC
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.class.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.class.php
@@ -816,11 +816,13 @@
817817 if( !self::qualityVersions() )
818818 $level = FR_SIGHTED;
819819 # Get the latest revision ID if not set
820 - if( !$latest )
 820+ if( !$latest ) {
821821 $latest = $article->getTitle()->getLatestRevID(GAID_FOR_UPDATE);
 822+ }
822823 $pageId = $article->getId();
823 - # Update pending times for each level
 824+ # Update pending times for each level, going from highest to lowest
824825 $dbw = wfGetDB( DB_MASTER );
 826+ $higherLevelId = 0;
825827 while( $level >= 0 ) {
826828 # Get the latest revision of this level...
827829 $row = $dbw->selectRow( array('flaggedrevs','revision'),
@@ -835,10 +837,12 @@
836838 array( 'ORDER BY' => 'fr_rev_id DESC', 'LIMIT' => 1 )
837839 );
838840 # If there is a revision of this level, track it...
 841+ # Revisions reviewed to one level count as reviewed
 842+ # at the lower levels (i.e. quality -> sighted).
839843 if( $row ) {
840 - $id = intval( $row->fr_rev_id );
 844+ $id = max( $higherLevelId, $row->fr_rev_id );
841845 # Get the timestamp of the edit after this version (if any)
842 - if( $latest != $id ) {
 846+ if( $latest > $id ) {
843847 $nextTimestamp = $dbw->selectField( 'revision',
844848 'rev_timestamp',
845849 array( 'rev_page' => $pageId,
@@ -853,6 +857,7 @@
854858 'fpp_pending_since' => $nextTimestamp
855859 );
856860 }
 861+ $higherLevelId = $id;
857862 }
858863 $level--;
859864 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r57184merged r57183aaron02:13, 1 October 2009
r57186Follow-up r57183: also fixed issue with missing levels in tracking data (i.e....aaron02:58, 1 October 2009

Status & tagging log