Index: trunk/extensions/FlaggedRevs/backend/FlaggedRevsStats.php |
— | — | @@ -228,7 +228,7 @@ |
229 | 229 | # Lastly, we want to avoid bias that would make the time too low |
230 | 230 | # since new revisions could not have "took a long time to sight". |
231 | 231 | $worstLagTS = $dbr->timestamp(); // now |
232 | | - $last = '0'; |
| 232 | + $encLastTS = $encInstalled; |
233 | 233 | while ( true ) { // should almost always be ~1 pass |
234 | 234 | # Get the page with the worst pending lag... |
235 | 235 | $row = $dbr->selectRow( array( 'flaggedpage_pending', 'flaggedrevs' ), |
— | — | @@ -237,7 +237,7 @@ |
238 | 238 | 'fpp_quality' => 0, // "checked" |
239 | 239 | 'fpp_pending_since > '.$encInstalled, // needs actual display lag |
240 | 240 | '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 |
242 | 242 | ), |
243 | 243 | __METHOD__, |
244 | 244 | array( 'ORDER BY' => 'fpp_pending_since ASC', |
— | — | @@ -258,7 +258,7 @@ |
259 | 259 | # Fudge factor to prevent deliberate reviewing of non-current revisions |
260 | 260 | # from squeezing the range. Shouldn't effect anything otherwise. |
261 | 261 | } else { |
262 | | - $last = $row->fpp_pending_since; // next iteration |
| 262 | + $encLastTS = $dbr->addQuotes( $row->fpp_pending_since ); // next iteration |
263 | 263 | } |
264 | 264 | } |
265 | 265 | # User condition (anons/users) |