X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FmoveBatch.php;h=43d4d25d155ca5a7218d3b4953c6ddc6f11d71da;hb=333474077f5d5605f9cdca1abe003fa26b694d27;hp=58499082b802d274792182744d9637b2ee8bdb4e;hpb=103291b11e8af8361ce0cd19d430dc3cf3d56192;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/moveBatch.php b/maintenance/moveBatch.php index 58499082b8..43d4d25d15 100644 --- a/maintenance/moveBatch.php +++ b/maintenance/moveBatch.php @@ -85,7 +85,7 @@ class MoveBatch extends Maintenance { } # Setup complete, now start - $dbw = wfGetDB( DB_MASTER ); + $dbw = $this->getDB( DB_MASTER ); // @codingStandardsIgnoreStart Ignore avoid function calls in a FOR loop test part warning for ( $linenum = 1; !feof( $file ); $linenum++ ) { // @codingStandardsIgnoreEnd @@ -106,13 +106,13 @@ class MoveBatch extends Maintenance { } $this->output( $source->getPrefixedText() . ' --> ' . $dest->getPrefixedText() ); - $dbw->begin( __METHOD__ ); + $this->beginTransaction( $dbw, __METHOD__ ); $mp = new MovePage( $source, $dest ); $status = $mp->move( $wgUser, $reason, !$noredirects ); if ( !$status->isOK() ) { $this->output( "\nFAILED: " . $status->getWikiText() ); } - $dbw->commit( __METHOD__ ); + $this->commitTransaction( $dbw, __METHOD__ ); $this->output( "\n" ); if ( $interval ) {