jenkins-bot has submitted this change and it was merged.
Change subject: Remove begin()/commit() calls that can break outer transactions
......................................................................
Remove begin()/commit() calls that can break outer transactions
The single statements are already atomic and will commit at
the end of the request in commitMasterChanges().
Bug: T120791
Change-Id: I26ca27ee0c7e98488beddc2c801a981879f6958a
---
M VoteClass.php
1 file changed, 0 insertions(+), 4 deletions(-)
Approvals:
Krinkle: Looks good to me, approved
jenkins-bot: Verified
diff --git a/VoteClass.php b/VoteClass.php
index db720b1..fb93914 100644
--- a/VoteClass.php
+++ b/VoteClass.php
@@ -121,7 +121,6 @@
*/
function delete() {
$dbw = wfGetDB( DB_MASTER );
- $dbw->begin();
$dbw->delete(
'Vote',
array(
@@ -130,7 +129,6 @@
),
__METHOD__
);
- $dbw->commit();
$this->clearCache();
@@ -153,7 +151,6 @@
$voteDate = date( 'Y-m-d H:i:s' );
wfRestoreWarnings();
if ( $this->UserAlreadyVoted() == false ) {
- $dbw->begin();
$dbw->insert(
'Vote',
array(
@@ -166,7 +163,6 @@
),
__METHOD__
);
- $dbw->commit();
$this->clearCache();
--
To view, visit https://gerrit.wikimedia.org/r/257764
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I26ca27ee0c7e98488beddc2c801a981879f6958a
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VoteNY
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits