X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FmoveBatch.php;h=a27a77262c22f698133558431d7ca43e0396d1ff;hb=7bc770bbd8e48dc9f23120b7f1739d84388d5b97;hp=713753f261e2ac631f7baa08518b1bea3522ac77;hpb=82b8b578938bf75bc9fa924aa95b10955d49ec6f;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" );