X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FmoveBatch.php;h=3c2968988ad966af5303f7e44871718e47153002;hb=08e0ed2b70ba5986a96c701f84a7679c98a6f2fd;hp=43d4d25d155ca5a7218d3b4953c6ddc6f11d71da;hpb=072e84d2480446f3b76c6cffe9cd414de5b0860c;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/moveBatch.php b/maintenance/moveBatch.php index 43d4d25d15..3c2968988a 100644 --- a/maintenance/moveBatch.php +++ b/maintenance/moveBatch.php @@ -45,7 +45,7 @@ require_once __DIR__ . '/Maintenance.php'; class MoveBatch extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Moves a batch of pages"; + $this->addDescription( 'Moves a batch of pages' ); $this->addOption( 'u', "User to perform move", false, true ); $this->addOption( 'r', "Reason to move page", false, true ); $this->addOption( 'i', "Interval to sleep between moves" ); @@ -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" );