X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=maintenance%2FdeleteBatch.php;h=a7513967348da5860647430cc6840a73b5fc929d;hb=2b441eba406f2c4988da80d264738d45930bf041;hp=6860a5afa47d136f196a589d9b8061e6163e304f;hpb=392af46809d831514f49618cdef1e1529d7fddf4;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/deleteBatch.php b/maintenance/deleteBatch.php index 6860a5afa4..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( dirname( __FILE__ ) . '/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;