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:
Aaron Schulz 2015-12-08 14:19:29 -08:00
parent 09cd0e3af0
commit 071fc82354

View file

@ -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();