X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=maintenance%2FmoveBatch.php;h=47828e690f2010c4a9213e38b39ee602bb93c2c6;hb=4d6828ef7835b7c5c5e903637fcba4bf5c487e1b;hp=090c3d41d080cc2be1c8f279cdc675ab47e19d85;hpb=c2adecb31b16a36efdb509a575533c7f103a0576;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/moveBatch.php b/maintenance/moveBatch.php index 090c3d41d0..47828e690f 100644 --- a/maintenance/moveBatch.php +++ b/maintenance/moveBatch.php @@ -65,8 +65,8 @@ class MoveBatch extends Maintenance { $reason = $this->getOption( 'r', '' ); $interval = $this->getOption( 'i', 0 ); $noredirects = $this->hasOption( 'noredirects' ); - if ( $this->hasArg() ) { - $file = fopen( $this->getArg(), 'r' ); + if ( $this->hasArg( 0 ) ) { + $file = fopen( $this->getArg( 0 ), 'r' ); } else { $file = $this->getStdin(); } @@ -86,7 +86,6 @@ class MoveBatch extends Maintenance { # Setup complete, now start $dbw = $this->getDB( DB_MASTER ); - // phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall for ( $linenum = 1; !feof( $file ); $linenum++ ) { $line = fgets( $file ); if ( $line === false ) { @@ -117,7 +116,6 @@ class MoveBatch extends Maintenance { if ( $interval ) { sleep( $interval ); } - wfWaitForSlaves(); } } }