Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php |
— | — | @@ -819,6 +819,7 @@ |
820 | 820 | $p['totalContentEdits'] = isset($p['totalContentEdits']) ? $p['totalContentEdits'] : 0; |
821 | 821 | $p['editComments'] = isset($p['editComments']) ? $p['editComments'] : 0; |
822 | 822 | $p['reviewedEdits'] = isset($p['reviewedEdits']) ? $p['reviewedEdits'] : 0; |
| 823 | + $p['revertedEdits'] = isset($p['revertedEdits']) ? $p['revertedEdits'] : 0; |
823 | 824 | if( $article->getTitle()->isContentPage() ) { |
824 | 825 | $pages = explode( ',', trim($p['uniqueContentPages']) ); // page IDs |
825 | 826 | # Don't let this get bloated for no reason |
— | — | @@ -852,6 +853,11 @@ |
853 | 854 | wfProfileOut( __METHOD__ ); |
854 | 855 | return true; |
855 | 856 | } |
| 857 | + # Check reverted edits |
| 858 | + if( $wgFlaggedRevsAutopromote['maxRevertedEdits'] < $p['revertedEdits'] ) { |
| 859 | + wfProfileOut( __METHOD__ ); |
| 860 | + return true; |
| 861 | + } |
856 | 862 | # Check if results are cached to avoid DB queries |
857 | 863 | $key = wfMemcKey( 'flaggedrevs', 'autopromote-skip', $user->getID() ); |
858 | 864 | $value = $wgMemc->get( $key ); |