Merge "Upgrade wikimedia/remex-html to 2.0.1" into REL1_31
[lhc/web/wiklou.git] / maintenance / populateImageSha1.php
index b581d66..212a20d 100644 (file)
@@ -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;