From: Aaron Schulz Date: Fri, 12 Sep 2014 22:58:40 +0000 (-0700) Subject: Made SiteSQLStore use startAtomic() instead of DIY X-Git-Tag: 1.31.0-rc.0~13992^2 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=182b331aa974dfedae7dd22e4b3c0533d553026e;p=lhc%2Fweb%2Fwiklou.git Made SiteSQLStore use startAtomic() instead of DIY Change-Id: I3f47675646d772b4718086e2715e243da3a16bab --- diff --git a/includes/site/SiteSQLStore.php b/includes/site/SiteSQLStore.php index 665940786f..944e9e261e 100644 --- a/includes/site/SiteSQLStore.php +++ b/includes/site/SiteSQLStore.php @@ -314,11 +314,7 @@ class SiteSQLStore implements SiteStore { $dbw = $this->sitesTable->getWriteDbConnection(); - $trx = $dbw->trxLevel(); - - if ( $trx == 0 ) { - $dbw->begin( __METHOD__ ); - } + $dbw->startAtomic( __METHOD__ ); $success = true; @@ -360,9 +356,7 @@ class SiteSQLStore implements SiteStore { ); } - if ( $trx == 0 ) { - $dbw->commit( __METHOD__ ); - } + $dbw->endAtomic( __METHOD__ ); // purge cache $this->reset();