X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FmoveBatch.php;h=d578a49642731bbd866f64e76e3b4f30962c7dc7;hb=87a0b17127195742e6c64472dbfdac65b4d254d7;hp=8645ab137523479689c790fd238f315e88764612;hpb=59db24e90bc6027cb8bf2756eb8cb52230d24966;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/moveBatch.php b/maintenance/moveBatch.php index 8645ab1375..d578a49642 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 { @@ -76,7 +76,7 @@ class MoveBatch extends Maintenance { $this->error( "Unable to read file, exiting", true ); } if ( $user === false ) { - $wgUser = User::newSystemUser( 'Move page script', array( 'steal' => true ) ); + $wgUser = User::newSystemUser( 'Move page script', [ 'steal' => true ] ); } else { $wgUser = User::newFromName( $user ); } @@ -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" );