r45396 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45395‎ | r45396 | r45397 >
Date:13:20, 4 January 2009
Author:aaron
Status:deferred
Tags:
Comment:
Check maxRevertedEdits
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php
@@ -819,6 +819,7 @@
820820 $p['totalContentEdits'] = isset($p['totalContentEdits']) ? $p['totalContentEdits'] : 0;
821821 $p['editComments'] = isset($p['editComments']) ? $p['editComments'] : 0;
822822 $p['reviewedEdits'] = isset($p['reviewedEdits']) ? $p['reviewedEdits'] : 0;
 823+ $p['revertedEdits'] = isset($p['revertedEdits']) ? $p['revertedEdits'] : 0;
823824 if( $article->getTitle()->isContentPage() ) {
824825 $pages = explode( ',', trim($p['uniqueContentPages']) ); // page IDs
825826 # Don't let this get bloated for no reason
@@ -852,6 +853,11 @@
853854 wfProfileOut( __METHOD__ );
854855 return true;
855856 }
 857+ # Check reverted edits
 858+ if( $wgFlaggedRevsAutopromote['maxRevertedEdits'] < $p['revertedEdits'] ) {
 859+ wfProfileOut( __METHOD__ );
 860+ return true;
 861+ }
856862 # Check if results are cached to avoid DB queries
857863 $key = wfMemcKey( 'flaggedrevs', 'autopromote-skip', $user->getID() );
858864 $value = $wgMemc->get( $key );

Status & tagging log