summaryrefslogtreecommitdiff
path: root/maintenance/moveBatch.php
diff options
context:
space:
mode:
Diffstat (limited to 'maintenance/moveBatch.php')
-rw-r--r--maintenance/moveBatch.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/maintenance/moveBatch.php b/maintenance/moveBatch.php
index 713753f2..a27a7726 100644
--- a/maintenance/moveBatch.php
+++ b/maintenance/moveBatch.php
@@ -103,10 +103,10 @@ class MoveBatch extends Maintenance {
$this->output( $source->getPrefixedText() . ' --> ' . $dest->getPrefixedText() );
$dbw->begin( __METHOD__ );
- $err = $source->moveTo( $dest, false, $reason, !$noredirects );
- if ( $err !== true ) {
- $msg = array_shift( $err[0] );
- $this->output( "\nFAILED: " . wfMessage( $msg, $err[0] )->text() );
+ $mp = new MovePage( $source, $dest );
+ $status = $mp->move( $wgUser, $reason, !$noredirects );
+ if ( !$status->isOK() ) {
+ $this->output( "\nFAILED: " . $status->getWikiText() );
}
$dbw->commit( __METHOD__ );
$this->output( "\n" );