* @return int Number of entries changed, or that would be changed
*/
private function doReassignEdits( &$from, &$to, $rc = false, $report = false ) {
- $dbw = wfGetDB( DB_MASTER );
- $dbw->begin( __METHOD__ );
+ $dbw = $this->getDB( DB_MASTER );
+ $this->beginTransaction( $dbw, __METHOD__ );
# Count things
$this->output( "Checking current edits..." );
}
}
- $dbw->commit( __METHOD__ );
+ $this->commitTransaction( $dbw, __METHOD__ );
return (int)$total;
}