r111448 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111447‎ | r111448 | r111449 >
Date:07:05, 14 February 2012
Author:aaron
Status:ok
Tags:1.19 
Comment:
PG fix: give fpp_pending_since condition a non-bogus initial value
Modified paths:
  • /trunk/extensions/FlaggedRevs/backend/FlaggedRevsStats.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/backend/FlaggedRevsStats.php
@@ -228,7 +228,7 @@
229229 # Lastly, we want to avoid bias that would make the time too low
230230 # since new revisions could not have "took a long time to sight".
231231 $worstLagTS = $dbr->timestamp(); // now
232 - $last = '0';
 232+ $encLastTS = $encInstalled;
233233 while ( true ) { // should almost always be ~1 pass
234234 # Get the page with the worst pending lag...
235235 $row = $dbr->selectRow( array( 'flaggedpage_pending', 'flaggedrevs' ),
@@ -237,7 +237,7 @@
238238 'fpp_quality' => 0, // "checked"
239239 'fpp_pending_since > '.$encInstalled, // needs actual display lag
240240 'fr_page_id = fpp_page_id AND fr_rev_id = fpp_rev_id',
241 - 'fpp_pending_since > '.$dbr->addQuotes($last), // skip failed rows
 241+ 'fpp_pending_since > '.$encLastTS, // skip failed rows
242242 ),
243243 __METHOD__,
244244 array( 'ORDER BY' => 'fpp_pending_since ASC',
@@ -258,7 +258,7 @@
259259 # Fudge factor to prevent deliberate reviewing of non-current revisions
260260 # from squeezing the range. Shouldn't effect anything otherwise.
261261 } else {
262 - $last = $row->fpp_pending_since; // next iteration
 262+ $encLastTS = $dbr->addQuotes( $row->fpp_pending_since ); // next iteration
263263 }
264264 }
265265 # User condition (anons/users)

Sign-offs

UserFlagDate
Awjrichardsinspected22:42, 17 February 2012

Status & tagging log