r49091 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r49090‎ | r49091 | r49092 >
Date:16:58, 31 March 2009
Author:aaron
Status:ok
Tags:
Comment:
Remove flag duplication
Modified paths:
  • /trunk/extensions/FlaggedRevs/maintenance/reviewAllPages.inc (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/maintenance/reviewAllPages.inc
@@ -21,6 +21,7 @@
2222 $blockEnd = $start + $BATCH_SIZE - 1;
2323 $count = 0;
2424 $changed = 0;
 25+ $flags = null; // Assume basic flagging level
2526 while( $blockEnd <= $end ) {
2627 echo "...doing page_id from $blockStart to $blockEnd\n";
2728 $cond = "page_id BETWEEN $blockStart AND $blockEnd";
@@ -36,11 +37,6 @@
3738 # Should exist, but to be safe...
3839 if( !$frev && $rev && FlaggedRevs::isPageReviewable($title) ) {
3940 $text = $rev->getText();
40 - # Assume basic flagging level
41 - $flags = array();
42 - foreach( FlaggedRevs::getDimensions() as $tag => $minQL ) {
43 - $flags[$tag] = 1;
44 - }
4541 $article = new Article( $title );
4642 FlaggedRevs::autoReviewEdit( $article, $user, $text, $rev, $flags, true );
4743 $changed++;

Status & tagging log