dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a01e85d
)
Replaced more trx DIY with startAtomic()
author
Aaron Schulz
<aschulz@wikimedia.org>
Wed, 17 Sep 2014 00:26:10 +0000
(17:26 -0700)
committer
Aaron Schulz
<aschulz@wikimedia.org>
Wed, 17 Sep 2014 00:26:10 +0000
(17:26 -0700)
Change-Id: I76662aa438ed8aa294f8ec5973c9a51fd8b7cdbf
includes/site/SiteSQLStore.php
patch
|
blob
|
history
diff --git
a/includes/site/SiteSQLStore.php
b/includes/site/SiteSQLStore.php
index
944e9e2
..
d133468
100644
(file)
--- 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();