r100328 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100327‎ | r100328 | r100329 >
Date:05:56, 20 October 2011
Author:aaron
Status:ok
Tags:
Comment:
Added 'excludeLastDays' to $wgFlaggedRevsAutoconfirm
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.config.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php
@@ -299,14 +299,16 @@
300300 if ( is_array( $req ) ) {
301301 $criteria = array( '&', // AND
302302 array( APCOND_AGE, $req['days']*86400 ),
303 - array( APCOND_EDITCOUNT, $req['edits'] ),
 303+ array( APCOND_EDITCOUNT, $req['edits'], $req['excludeLastDays']*86400 ),
304304 array( APCOND_FR_EDITSUMMARYCOUNT, $req['editComments'] ),
305305 array( APCOND_FR_UNIQUEPAGECOUNT, $req['uniqueContentPages'] ),
306306 array( APCOND_FR_EDITSPACING, $req['spacing'], $req['benchmarks'] ),
307307 array( '|', // OR
308 - array( APCOND_FR_CONTENTEDITCOUNT, $req['totalContentEdits'] ),
309 - array( APCOND_FR_CHECKEDEDITCOUNT, $req['totalCheckedEdits'] )
310 - )
 308+ array( APCOND_FR_CONTENTEDITCOUNT,
 309+ $req['totalContentEdits'], $req['excludeLastDays']*86400 ),
 310+ array( APCOND_FR_CHECKEDEDITCOUNT,
 311+ $req['totalCheckedEdits'], $req['excludeLastDays']*86400 )
 312+ ),
311313 );
312314 if ( $req['email'] ) {
313315 $criteria[] = array( APCOND_EMAILCONFIRMED );
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.config.php
@@ -107,6 +107,7 @@
108108 $wgFlaggedRevsAutoconfirm = array(
109109 'days' => 30, # days since registration
110110 'edits' => 50, # total edit count
 111+ 'excludeLastDays' => 2, # exclude the last X days of edits from edit counts
111112 'benchmarks' => 7, # number of "spread out" edits
112113 'spacing' => 3, # number of days between these edits (the "spread")
113114 // Either totalContentEdits reqs OR totalCheckedEdits requirements needed

Status & tagging log