X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fdb%2FDatabase.php;h=dea4a594f4fd75ff512b889bbdc90f15a39289ff;hb=3ae13728c4c9fe67629473a7520a9df301024936;hp=68f94b6851e02fd6b924f62b9567a51934940670;hpb=c09e27cc23fd553f17a21d699ae4626ec173a6eb;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/db/Database.php b/includes/db/Database.php index 68f94b6851..dea4a594f4 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -3308,7 +3308,11 @@ abstract class DatabaseBase implements IDatabase { list( $phpCallback ) = $callback; $this->clearFlag( DBO_TRX ); // make each query its own transaction call_user_func( $phpCallback ); - $this->setFlag( $autoTrx ? DBO_TRX : 0 ); // restore automatic begin() + if ( $autoTrx ) { + $this->setFlag( DBO_TRX ); // restore automatic begin() + } else { + $this->clearFlag( DBO_TRX ); // restore auto-commit + } } catch ( Exception $e ) { if ( $ePrior ) { MWExceptionHandler::logException( $ePrior );