X-Git-Url: https://git.heureux-cyclage.org/w/index.php?a=blobdiff_plain;f=maintenance%2FpopulateRevisionLength.php;h=8895c9f4f7724a47ad78bee59fbbc30528e7935e;hb=9c85176cec5be2054e04521e80486165d4901b3a;hp=5de5819735732e7f60f1bcc25152d08f31fdd37e;hpb=e7f6fc6d6f2306ec9b07e736088f3fd420c70681;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/populateRevisionLength.php b/maintenance/populateRevisionLength.php index 5de5819735..8895c9f4f7 100644 --- a/maintenance/populateRevisionLength.php +++ b/maintenance/populateRevisionLength.php @@ -44,9 +44,9 @@ class PopulateRevisionLength extends LoggedUpdateMaintenance { public function doDBUpdates() { $dbw = $this->getDB( DB_MASTER ); if ( !$dbw->tableExists( 'revision' ) ) { - $this->error( "revision table does not exist", true ); + $this->fatalError( "revision table does not exist" ); } elseif ( !$dbw->tableExists( 'archive' ) ) { - $this->error( "archive table does not exist", true ); + $this->fatalError( "archive table does not exist" ); } elseif ( !$dbw->fieldExists( 'revision', 'rev_len', __METHOD__ ) ) { $this->output( "rev_len column does not exist\n\n", true ); @@ -76,8 +76,8 @@ class PopulateRevisionLength extends LoggedUpdateMaintenance { $dbr = $this->getDB( DB_REPLICA ); $dbw = $this->getDB( DB_MASTER ); $batchSize = $this->getBatchSize(); - $start = $dbw->selectField( $table, "MIN($idCol)", false, __METHOD__ ); - $end = $dbw->selectField( $table, "MAX($idCol)", false, __METHOD__ ); + $start = $dbw->selectField( $table, "MIN($idCol)", '', __METHOD__ ); + $end = $dbw->selectField( $table, "MAX($idCol)", '', __METHOD__ ); if ( !$start || !$end ) { $this->output( "...$table table seems to be empty.\n" ); @@ -117,7 +117,6 @@ class PopulateRevisionLength extends LoggedUpdateMaintenance { $blockStart += $batchSize; $blockEnd += $batchSize; - wfWaitForSlaves(); } return $count; @@ -157,5 +156,5 @@ class PopulateRevisionLength extends LoggedUpdateMaintenance { } } -$maintClass = "PopulateRevisionLength"; +$maintClass = PopulateRevisionLength::class; require_once RUN_MAINTENANCE_IF_MAIN;