diff options
author | Aaron Schulz <aschulz@wikimedia.org> | 2014-09-12 15:58:40 -0700 |
---|---|---|
committer | Reedy <reedy@wikimedia.org> | 2014-09-16 22:53:32 +0000 |
commit | 182b331aa974dfedae7dd22e4b3c0533d553026e (patch) | |
tree | 01ed888e6e72a929cfd5e42127d1ce1dd8b76302 /includes | |
parent | 53e8f804e791e0d0f8f120a9db61897c1f3c5d73 (diff) | |
download | mediawikicore-182b331aa974dfedae7dd22e4b3c0533d553026e.tar.gz mediawikicore-182b331aa974dfedae7dd22e4b3c0533d553026e.zip |
Made SiteSQLStore use startAtomic() instead of DIY
Change-Id: I3f47675646d772b4718086e2715e243da3a16bab
Diffstat (limited to 'includes')
-rw-r--r-- | includes/site/SiteSQLStore.php | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/includes/site/SiteSQLStore.php b/includes/site/SiteSQLStore.php index 665940786f45..944e9e261ee3 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(); |