X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2Frebuildrecentchanges.php;h=bbf91f585e5a737e47d892a04e1fca703188279b;hb=6af796f3e0cf3e66cd7d7e59af8445f5712d68fe;hp=a2cf3c5bcac2ed95ca77e563d8e16d8ce6448eb6;hpb=c15f569fcec998b0a77a22a7970abfcb6a394d79;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/rebuildrecentchanges.php b/maintenance/rebuildrecentchanges.php index a2cf3c5bca..bbf91f585e 100644 --- a/maintenance/rebuildrecentchanges.php +++ b/maintenance/rebuildrecentchanges.php @@ -61,7 +61,7 @@ class RebuildRecentchanges extends Maintenance { ( $this->hasOption( 'from' ) && !$this->hasOption( 'to' ) ) || ( !$this->hasOption( 'from' ) && $this->hasOption( 'to' ) ) ) { - $this->error( "Both 'from' and 'to' must be given, or neither", 1 ); + $this->fatalError( "Both 'from' and 'to' must be given, or neither" ); } $this->rebuildRecentChangesTablePass1(); @@ -109,7 +109,7 @@ class RebuildRecentchanges extends Maintenance { 'rc_timestamp < ' . $dbw->addQuotes( $dbw->timestamp( $this->cutoffTo ) ) ] ); - foreach ( array_chunk( $rcids, $this->mBatchSize ) as $rcidBatch ) { + foreach ( array_chunk( $rcids, $this->getBatchSize() ) as $rcidBatch ) { $dbw->delete( 'recentchanges', [ 'rc_id' => $rcidBatch ], __METHOD__ ); wfGetLBFactory()->waitForReplication(); } @@ -166,7 +166,7 @@ class RebuildRecentchanges extends Maintenance { ] + $rcCommentStore->insert( $dbw, $comment ), __METHOD__ ); - if ( ( ++$inserted % $this->mBatchSize ) == 0 ) { + if ( ( ++$inserted % $this->getBatchSize() ) == 0 ) { wfGetLBFactory()->waitForReplication(); } } @@ -256,7 +256,7 @@ class RebuildRecentchanges extends Maintenance { $lastOldId = intval( $obj->rc_this_oldid ); $lastSize = $size; - if ( ( ++$updated % $this->mBatchSize ) == 0 ) { + if ( ( ++$updated % $this->getBatchSize() ) == 0 ) { wfGetLBFactory()->waitForReplication(); } } @@ -340,7 +340,7 @@ class RebuildRecentchanges extends Maintenance { __METHOD__ ); - if ( ( ++$inserted % $this->mBatchSize ) == 0 ) { + if ( ( ++$inserted % $this->getBatchSize() ) == 0 ) { wfGetLBFactory()->waitForReplication(); } } @@ -392,7 +392,7 @@ class RebuildRecentchanges extends Maintenance { __METHOD__ ); - foreach ( array_chunk( $rcids, $this->mBatchSize ) as $rcidBatch ) { + foreach ( array_chunk( $rcids, $this->getBatchSize() ) as $rcidBatch ) { $dbw->update( 'recentchanges', [ 'rc_bot' => 1 ], @@ -474,7 +474,7 @@ class RebuildRecentchanges extends Maintenance { __METHOD__ ); - if ( ( ++$updates % $this->mBatchSize ) == 0 ) { + if ( ( ++$updates % $this->getBatchSize() ) == 0 ) { wfGetLBFactory()->waitForReplication(); } }