From: Aaron Schulz Date: Wed, 17 Sep 2014 00:26:10 +0000 (-0700) Subject: Replaced more trx DIY with startAtomic() X-Git-Tag: 1.31.0-rc.0~13986^2 X-Git-Url: http://git.cyclocoop.org//%27%40script%40/%27?a=commitdiff_plain;h=56bd04b471269e26120ee58c38d413b91a055608;p=lhc%2Fweb%2Fwiklou.git Replaced more trx DIY with startAtomic() Change-Id: I76662aa438ed8aa294f8ec5973c9a51fd8b7cdbf --- diff --git a/includes/site/SiteSQLStore.php b/includes/site/SiteSQLStore.php index 944e9e261e..d133468053 100644 --- a/includes/site/SiteSQLStore.php +++ b/includes/site/SiteSQLStore.php @@ -392,18 +392,10 @@ class SiteSQLStore implements SiteStore { wfProfileIn( __METHOD__ ); $dbw = $this->sitesTable->getWriteDbConnection(); - $trx = $dbw->trxLevel(); - - if ( $trx == 0 ) { - $dbw->begin( __METHOD__ ); - } - + $dbw->startAtomic( __METHOD__ ); $ok = $dbw->delete( 'sites', '*', __METHOD__ ); $ok = $dbw->delete( 'site_identifiers', '*', __METHOD__ ) && $ok; - - if ( $trx == 0 ) { - $dbw->commit( __METHOD__ ); - } + $dbw->endAtomic( __METHOD__); $this->reset();