X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=maintenance%2FdeleteBatch.php;h=a7513967348da5860647430cc6840a73b5fc929d;hb=2b441eba406f2c4988da80d264738d45930bf041;hp=936a52b85749171fde467d4fb00229784e8baac9;hpb=b0cb8e159236e8e57edcc36f0f1dfb303a5acf11;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/deleteBatch.php b/maintenance/deleteBatch.php index 936a52b857..a751396734 100644 --- a/maintenance/deleteBatch.php +++ b/maintenance/deleteBatch.php @@ -3,11 +3,11 @@ * Deletes a batch of pages. * Usage: php deleteBatch.php [-u ] [-r ] [-i ] [listfile] * where - * [listfile] is a file where each line contains the title of a page to be - * deleted, standard input is used if listfile is not given. - * is the username - * is the delete reason - * is the number of seconds to sleep for after each delete + * [listfile] is a file where each line contains the title of a page to be + * deleted, standard input is used if listfile is not given. + * is the username + * is the delete reason + * is the number of seconds to sleep for after each delete * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,7 +28,7 @@ * @ingroup Maintenance */ -require_once( __DIR__ . '/Maintenance.php' ); +require_once __DIR__ . '/Maintenance.php'; /** * Maintenance script to delete a batch of pages. @@ -79,7 +79,9 @@ class DeleteBatch extends Maintenance { $dbw = wfGetDB( DB_MASTER ); # Handle each entry + // @codingStandardsIgnoreStart Ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowed for ( $linenum = 1; !feof( $file ); $linenum++ ) { + // @codingStandardsIgnoreEnd $line = trim( fgets( $file ) ); if ( $line == '' ) { continue; @@ -121,4 +123,4 @@ class DeleteBatch extends Maintenance { } $maintClass = "DeleteBatch"; -require_once( RUN_MAINTENANCE_IF_MAIN ); +require_once RUN_MAINTENANCE_IF_MAIN;