r68248 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r68247‎ | r68248 | r68249 >
Date:21:09, 18 June 2010
Author:aaron
Status:ok
Tags:
Comment:
Ignore $mod if FlaggedRevs::stableOnlyIfConfigured() to avoid sample problems
Modified paths:
  • /trunk/extensions/FlaggedRevs/maintenance/updateStats.inc (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/maintenance/updateStats.inc
@@ -143,9 +143,13 @@
144144 $minTS = max($minTS,$installed);
145145 # Get timestamp boundaries
146146 $timeCondition = 'rev_timestamp BETWEEN '.$encMinTS.' AND '.$encMaxTS;
147 - # Modulus (to spread out over range)
148 - $mod = intval($rows/$size);
149 - $mod = max($mod,1); # $mod >= 1
 147+ if ( FlaggedRevs::stableOnlyIfConfigured() ) {
 148+ $mod = 1; // can't estimate $mod based on all edits in the range
 149+ } else {
 150+ # Modulus (to spread out over range)
 151+ $mod = intval($rows/$size);
 152+ $mod = max($mod,1); # $mod >= 1
 153+ }
150154 # For edits that started off pending, how long do they take to get reviewed?
151155 # Get the *first* reviewed rev *after* each RC item and get the average difference.
152156 # Only do this for revisions to pages that *were* already logged as reviewed.

Status & tagging log