X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FmoveBatch.php;h=fa25a06cca01584b4a04f86f9b296c8a5fc953b2;hb=dcfb68a6f700c25dd1dad85da9777cae9c92a586;hp=3a1a72c81dc299f8611c65def244cd2109ec1ce7;hpb=3071f1fad720f1773864621158a0c59b73124896;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/moveBatch.php b/maintenance/moveBatch.php index 3a1a72c81d..fa25a06cca 100644 --- a/maintenance/moveBatch.php +++ b/maintenance/moveBatch.php @@ -64,7 +64,7 @@ class MoveBatch extends Maintenance { $user = $this->getOption( 'u', false ); $reason = $this->getOption( 'r', '' ); $interval = $this->getOption( 'i', 0 ); - $noredirects = $this->getOption( 'noredirects', false ); + $noredirects = $this->hasOption( 'noredirects' ); if ( $this->hasArg() ) { $file = fopen( $this->getArg(), 'r' ); } else { @@ -73,7 +73,7 @@ class MoveBatch extends Maintenance { # Setup if ( !$file ) { - $this->error( "Unable to read file, exiting", true ); + $this->fatalError( "Unable to read file, exiting" ); } if ( $user === false ) { $wgUser = User::newSystemUser( 'Move page script', [ 'steal' => true ] ); @@ -81,7 +81,7 @@ class MoveBatch extends Maintenance { $wgUser = User::newFromName( $user ); } if ( !$wgUser ) { - $this->error( "Invalid username", true ); + $this->fatalError( "Invalid username" ); } # Setup complete, now start @@ -110,7 +110,7 @@ class MoveBatch extends Maintenance { $mp = new MovePage( $source, $dest ); $status = $mp->move( $wgUser, $reason, !$noredirects ); if ( !$status->isOK() ) { - $this->output( "\nFAILED: " . $status->getWikiText() ); + $this->output( "\nFAILED: " . $status->getWikiText( false, false, 'en' ) ); } $this->commitTransaction( $dbw, __METHOD__ ); $this->output( "\n" );