X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=maintenance%2FmoveBatch.php;h=b54ed4566b05be0cd41d72272157dc9a1b5565ba;hp=47828e690f2010c4a9213e38b39ee602bb93c2c6;hb=7afced64454ad30d688540f7626448ac2faefebb;hpb=b306873222f91789e334abcf2005d4b610cfce91 diff --git a/maintenance/moveBatch.php b/maintenance/moveBatch.php index 47828e690f..b54ed4566b 100644 --- a/maintenance/moveBatch.php +++ b/maintenance/moveBatch.php @@ -35,6 +35,8 @@ * e.g. immobile_namespace for namespaces which can't be moved */ +use MediaWiki\MediaWikiServices; + require_once __DIR__ . '/Maintenance.php'; /** @@ -105,10 +107,11 @@ class MoveBatch extends Maintenance { $this->output( $source->getPrefixedText() . ' --> ' . $dest->getPrefixedText() ); $this->beginTransaction( $dbw, __METHOD__ ); - $mp = new MovePage( $source, $dest ); + $mp = MediaWikiServices::getInstance()->getMovePageFactory() + ->newMovePage( $source, $dest ); $status = $mp->move( $wgUser, $reason, !$noredirects ); if ( !$status->isOK() ) { - $this->output( "\nFAILED: " . $status->getWikiText( false, false, 'en' ) ); + $this->output( "\nFAILED: " . $status->getMessage( false, false, 'en' )->text() ); } $this->commitTransaction( $dbw, __METHOD__ ); $this->output( "\n" );