X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=maintenance%2FpopulateImageSha1.php;h=212a20de89b3080686bf5bfee94055ca26ef6dbb;hp=b581d6614c82bd289b7ef366a9614d38cbcd2a16;hb=74426f3cf796b149f1ae445e41815bbe148640b2;hpb=9ba3fca2d8adc56787c8efc32c41424cb212e387 diff --git a/maintenance/populateImageSha1.php b/maintenance/populateImageSha1.php index b581d6614c..212a20de89 100644 --- a/maintenance/populateImageSha1.php +++ b/maintenance/populateImageSha1.php @@ -76,9 +76,7 @@ class PopulateImageSha1 extends LoggedUpdateMaintenance { __METHOD__ ); if ( !$res ) { - $this->error( "No such file: $file", true ); - - return false; + $this->fatalError( "No such file: $file" ); } $this->output( "Populating img_sha1 field for specified files\n" ); } else { @@ -119,7 +117,7 @@ class PopulateImageSha1 extends LoggedUpdateMaintenance { $numRows = $res->numRows(); $i = 0; foreach ( $res as $row ) { - if ( $i % $this->mBatchSize == 0 ) { + if ( $i % $this->getBatchSize() == 0 ) { $this->output( sprintf( "Done %d of %d, %5.3f%% \r", $i, $numRows, $i / $numRows * 100 ) ); wfWaitForSlaves(); @@ -180,5 +178,5 @@ class PopulateImageSha1 extends LoggedUpdateMaintenance { } } -$maintClass = "PopulateImageSha1"; +$maintClass = PopulateImageSha1::class; require_once RUN_MAINTENANCE_IF_MAIN;