X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=maintenance%2FmoveBatch.php;h=090c3d41d080cc2be1c8f279cdc675ab47e19d85;hp=d578a49642731bbd866f64e76e3b4f30962c7dc7;hb=7babd362babcbf7f20adb8e12edb4f4bc1d4249f;hpb=85ac1b5d7c7ca50a93f2d16639cdde2f46bc133e diff --git a/maintenance/moveBatch.php b/maintenance/moveBatch.php index d578a49642..090c3d41d0 100644 --- a/maintenance/moveBatch.php +++ b/maintenance/moveBatch.php @@ -73,7 +73,7 @@ class MoveBatch extends Maintenance { # Setup if ( !$file ) { - $this->error( "Unable to read file, exiting", true ); + $this->fatalError( "Unable to read file, exiting" ); } if ( $user === false ) { $wgUser = User::newSystemUser( 'Move page script', [ 'steal' => true ] ); @@ -81,14 +81,13 @@ class MoveBatch extends Maintenance { $wgUser = User::newFromName( $user ); } if ( !$wgUser ) { - $this->error( "Invalid username", true ); + $this->fatalError( "Invalid username" ); } # Setup complete, now start $dbw = $this->getDB( DB_MASTER ); - // @codingStandardsIgnoreStart Ignore avoid function calls in a FOR loop test part warning + // phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall for ( $linenum = 1; !feof( $file ); $linenum++ ) { - // @codingStandardsIgnoreEnd $line = fgets( $file ); if ( $line === false ) { break; @@ -123,5 +122,5 @@ class MoveBatch extends Maintenance { } } -$maintClass = "MoveBatch"; +$maintClass = MoveBatch::class; require_once RUN_MAINTENANCE_IF_MAIN;