X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FdeleteBatch.php;h=4f9e488343daefd43912d554f0f7dce13f15e157;hb=35afb25421a7b0d40a41a2bc006e82433540e5b4;hp=9e35687dcf6491701f9f12187c4473acf6b50c34;hpb=b6fecdf6feeb785a8d72c8467e25bcd30261baa5;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/deleteBatch.php b/maintenance/deleteBatch.php index 9e35687dcf..4f9e488343 100644 --- a/maintenance/deleteBatch.php +++ b/maintenance/deleteBatch.php @@ -69,8 +69,8 @@ class DeleteBatch extends Maintenance { } $wgUser = $user; - if ( $this->hasArg() ) { - $file = fopen( $this->getArg(), 'r' ); + if ( $this->hasArg( 0 ) ) { + $file = fopen( $this->getArg( 0 ), 'r' ); } else { $file = $this->getStdin(); } @@ -80,10 +80,7 @@ class DeleteBatch extends Maintenance { $this->fatalError( "Unable to read file, exiting" ); } - $dbw = $this->getDB( DB_MASTER ); - # Handle each entry - // phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall for ( $linenum = 1; !feof( $file ); $linenum++ ) { $line = trim( fgets( $file ) ); if ( $line == '' ) {