X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FmoveBatch.php;h=a27a77262c22f698133558431d7ca43e0396d1ff;hb=415b31766677e190c13322742b4e42da1157538c;hp=713753f261e2ac631f7baa08518b1bea3522ac77;hpb=cb8a938105e9ee944e3a137d331506870c8f7320;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/moveBatch.php b/maintenance/moveBatch.php index 713753f261..a27a77262c 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" );