mirror of
https://bitbucket.org/vertlach/voteny.git
synced 2024-05-01 11:29:19 +03:00
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
This commit is contained in:
parent
09cd0e3af0
commit
071fc82354
|
@ -121,7 +121,6 @@ class Vote {
|
|||
*/
|
||||
function delete() {
|
||||
$dbw = wfGetDB( DB_MASTER );
|
||||
$dbw->begin();
|
||||
$dbw->delete(
|
||||
'Vote',
|
||||
array(
|
||||
|
@ -130,7 +129,6 @@ class Vote {
|
|||
),
|
||||
__METHOD__
|
||||
);
|
||||
$dbw->commit();
|
||||
|
||||
$this->clearCache();
|
||||
|
||||
|
@ -153,7 +151,6 @@ class Vote {
|
|||
$voteDate = date( 'Y-m-d H:i:s' );
|
||||
wfRestoreWarnings();
|
||||
if ( $this->UserAlreadyVoted() == false ) {
|
||||
$dbw->begin();
|
||||
$dbw->insert(
|
||||
'Vote',
|
||||
array(
|
||||
|
@ -166,7 +163,6 @@ class Vote {
|
|||
),
|
||||
__METHOD__
|
||||
);
|
||||
$dbw->commit();
|
||||
|
||||
$this->clearCache();
|
||||
|
||||
|
|
Loading…
Reference in a new issue