X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FdeleteBatch.php;h=0f3c506734e4907735508531199030547c964cab;hb=9a3e888d65e886cf7f88957aaebd3d10d7856728;hp=0020446b41653d5d3555273928961e945a938c77;hpb=e3bd13db0c285f312e31bb1b7271af4628cca80c;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/deleteBatch.php b/maintenance/deleteBatch.php index 0020446b41..0f3c506734 100644 --- a/maintenance/deleteBatch.php +++ b/maintenance/deleteBatch.php @@ -65,7 +65,7 @@ class DeleteBatch extends Maintenance { $user = User::newFromName( $username ); } if ( !$user ) { - $this->error( "Invalid username", true ); + $this->fatalError( "Invalid username" ); } $wgUser = $user; @@ -77,15 +77,14 @@ class DeleteBatch extends Maintenance { # Setup if ( !$file ) { - $this->error( "Unable to read file, exiting", true ); + $this->fatalError( "Unable to read file, exiting" ); } $dbw = $this->getDB( DB_MASTER ); # Handle each entry - // @codingStandardsIgnoreStart Ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowed + // phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall for ( $linenum = 1; !feof( $file ); $linenum++ ) { - // @codingStandardsIgnoreEnd $line = trim( fgets( $file ) ); if ( $line == '' ) { continue; @@ -124,5 +123,5 @@ class DeleteBatch extends Maintenance { } } -$maintClass = "DeleteBatch"; +$maintClass = DeleteBatch::class; require_once RUN_MAINTENANCE_IF_MAIN;