X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=maintenance%2FupdateRestrictions.php;h=ffbdb2baaac85c9cd57ad00687193927be0319db;hb=73994ed5968b127eead3f0f0d6571c289b557abe;hp=2bf68ddf708e68169d08dfe132787a330ac16a03;hpb=d881d1fdcafd7510ef16281c8dec079db990e8cf;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/updateRestrictions.php b/maintenance/updateRestrictions.php index 2bf68ddf70..ffbdb2baaa 100644 --- a/maintenance/updateRestrictions.php +++ b/maintenance/updateRestrictions.php @@ -44,7 +44,7 @@ class UpdateRestrictions extends Maintenance { $this->error( "Nothing to do.", true ); } $end = $db->selectField( 'page', 'MAX(page_id)', false, __METHOD__ ); - + # Do remaining chunk $end += $this->mBatchSize - 1; $blockStart = $start; @@ -64,7 +64,7 @@ class UpdateRestrictions extends Maintenance { // old old format should be treated as edit/move restriction $oldRestrictions["edit"] = trim( $temp[0] ); $oldRestrictions["move"] = trim( $temp[0] ); - } else if ( $temp[1] ) { + } elseif ( $temp[1] ) { $oldRestrictions[$temp[0]] = trim( $temp[1] ); } } @@ -96,7 +96,7 @@ class UpdateRestrictions extends Maintenance { } $blockStart += $this->mBatchSize - 1; $blockEnd += $this->mBatchSize - 1; - wfWaitForSlaves( 5 ); + wfWaitForSlaves(); } $this->output( "...removing dead rows from page_restrictions\n" ); // Kill any broken rows from previous imports @@ -108,4 +108,4 @@ class UpdateRestrictions extends Maintenance { } $maintClass = "UpdateRestrictions"; -require_once( DO_MAINTENANCE ); +require_once( RUN_MAINTENANCE_IF_MAIN );