r85924 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85923‎ | r85924 | r85925 >
Date:21:48, 12 April 2011
Author:aaron
Status:ok
Tags:
Comment:
Fixed comment, tweaked batch size, and removed FR_MASTER (which was kind of overkill)
Modified paths:
  • /trunk/extensions/FlaggedRevs/maintenance/purgeReviewablePages.inc (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/maintenance/purgeReviewablePages.inc
@@ -10,7 +10,7 @@
1111 echo "There are no reviewable namespaces ... nothing to purge.\n";
1212 return;
1313 }
14 - $BATCH_SIZE = 500;
 14+ $BATCH_SIZE = 1000;
1515 $start = $db->selectField( 'page', 'MIN(page_id)', false, __FUNCTION__ );
1616 $end = $db->selectField( 'page', 'MAX(page_id)', false, __FUNCTION__ );
1717 if ( is_null( $start ) || is_null( $end ) ) {
@@ -30,11 +30,11 @@
3131 'page_namespace' => $wgFlaggedRevsNamespaces ),
3232 __FUNCTION__
3333 );
34 - # Go through and protect each page...
 34+ # Go through and append each purgeable page...
3535 foreach ( $res as $row ) {
3636 $title = Title::newFromRow( $row );
3737 $fa = FlaggedArticle::getTitleInstance( $title );
38 - if ( $fa->isReviewable( FR_MASTER ) ) {
 38+ if ( $fa->isReviewable() ) {
3939 # Need to purge this page - add to list
4040 fwrite( $fileHandle, $title->getPrefixedDBKey() . "\n" );
4141 $count++;

Status & tagging log