r78293 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78292‎ | r78293 | r78294 >
Date:08:43, 13 December 2010
Author:aaron
Status:ok
Tags:
Comment:
fp_reviewed consistency tweaks and minor code cleanup
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.class.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.class.php
@@ -730,13 +730,13 @@
731731 );
732732 # Get the timestamp of the first edit after the stable version (if any)...
733733 $nextTimestamp = null;
734 - $revId = $rev->getId();
735 - if ( $latest != $revId ) {
736 - $timestamp = $rev->getTimestamp();
 734+ if ( $rev->getId() != $latest ) {
 735+ $timestamp = $dbw->timestamp( $rev->getTimestamp() );
737736 $nextEditTS = $dbw->selectField( 'revision',
738737 'rev_timestamp',
739 - array( 'rev_page' => $article->getId(),
740 - "rev_timestamp > " . $dbw->addQuotes( $dbw->timestamp( $timestamp ) ) ),
 738+ array(
 739+ 'rev_page' => $article->getId(),
 740+ "rev_timestamp > " . $dbw->addQuotes( $timestamp ) ),
741741 __METHOD__,
742742 array( 'ORDER BY' => 'rev_timestamp ASC', 'LIMIT' => 1 )
743743 );
@@ -748,10 +748,10 @@
749749 $dbw->replace( 'flaggedpages',
750750 array( 'fp_page_id' ),
751751 array(
752 - 'fp_stable' => $revId,
753 - 'fp_reviewed' => ( $latest == $revId ) ? 1 : 0,
 752+ 'fp_page_id' => $article->getId(),
 753+ 'fp_stable' => $rev->getId(),
 754+ 'fp_reviewed' => ( $nextTimestamp === null ) ? 1 : 0,
754755 'fp_quality' => ( $maxQuality === false ) ? null : $maxQuality,
755 - 'fp_page_id' => $article->getId(),
756756 'fp_pending_since' => $dbw->timestampOrNull( $nextTimestamp )
757757 ),
758758 __METHOD__

Follow-up revisions

RevisionCommit summaryAuthorDate
r80733MFT first round of FlaggedRevs fixes r78517, r78346, r78319, r78293, r78226, ...demon23:56, 21 January 2011

Status & tagging log