*
* @param integer $id The page_id
* @param Title $newTitle The new title
+ * @return bool
*/
private function mergePage( $row, Title $newTitle ) {
$id = $row->page_id;
$wikiPage->loadPageData( 'fromdbmaster' );
$destId = $newTitle->getArticleId();
- $this->db->begin( __METHOD__ );
+ $this->beginTransaction( $this->db, __METHOD__ );
$this->db->update( 'revision',
// SET
array( 'rev_page' => $destId ),
*/
$update = new LinksDeletionUpdate( $wikiPage );
$update->doUpdate();
- $this->db->commit( __METHOD__ );
+ $this->commitTransaction( $this->db, __METHOD__ );
return true;
}
);
$count = 0;
- $dbo->begin( __METHOD__ );
+ $this->beginTransaction( $dbo, __METHOD__ );
foreach ( $checks as $table => $fprefix ) {
$conds = array( $fprefix . '_user' => $id );
$count += (int)$dbo->selectField( $table, 'COUNT(*)', $conds, __METHOD__ );
$conds = array( 'log_user' => $id, 'log_type != ' . $dbo->addQuotes( 'newusers' ) );
$count += (int)$dbo->selectField( 'logging', 'COUNT(*)', $conds, __METHOD__ );
- $dbo->commit( __METHOD__ );
+ $this->commitTransaction( $dbo, __METHOD__ );
return $count == 0;
}