X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Flibs%2Frdbms%2Flbfactory%2FLBFactory.php;h=36e961a428670be3d7a16766b26bb1aa5ea7bbd7;hb=e29538b1b3b832b59442cc1116944c912cc9d471;hp=a85e1e544f2aed0914e65f59e83b14db189e8128;hpb=1c5deb40ad077c9bebe809930a74bfbc2c871247;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/rdbms/lbfactory/LBFactory.php b/includes/libs/rdbms/lbfactory/LBFactory.php index a85e1e544f..36e961a428 100644 --- a/includes/libs/rdbms/lbfactory/LBFactory.php +++ b/includes/libs/rdbms/lbfactory/LBFactory.php @@ -160,7 +160,9 @@ abstract class LBFactory implements ILBFactory { } public function destroy() { - $this->shutdown( self::SHUTDOWN_NO_CHRONPROT ); + /** @noinspection PhpUnusedLocalVariableInspection */ + $scope = ScopedCallback::newScopedIgnoreUserAbort(); + $this->forEachLBCallMethod( 'disable' ); } @@ -178,6 +180,9 @@ abstract class LBFactory implements ILBFactory { &$cpIndex = null, &$cpClientId = null ) { + /** @noinspection PhpUnusedLocalVariableInspection */ + $scope = ScopedCallback::newScopedIgnoreUserAbort(); + $chronProt = $this->getChronologyProtector(); if ( $mode === self::SHUTDOWN_CHRONPROT_SYNC ) { $this->shutdownChronologyProtector( $chronProt, $workCallback, 'sync', $cpIndex ); @@ -251,6 +256,9 @@ abstract class LBFactory implements ILBFactory { final public function beginMasterChanges( $fname = __METHOD__ ) { $this->assertTransactionRoundStage( self::ROUND_CURSORY ); + /** @noinspection PhpUnusedLocalVariableInspection */ + $scope = ScopedCallback::newScopedIgnoreUserAbort(); + $this->trxRoundStage = self::ROUND_BEGINNING; if ( $this->trxRoundId !== false ) { throw new DBTransactionError( @@ -266,6 +274,9 @@ abstract class LBFactory implements ILBFactory { final public function commitMasterChanges( $fname = __METHOD__, array $options = [] ) { $this->assertTransactionRoundStage( self::ROUND_CURSORY ); + /** @noinspection PhpUnusedLocalVariableInspection */ + $scope = ScopedCallback::newScopedIgnoreUserAbort(); + $this->trxRoundStage = self::ROUND_COMMITTING; if ( $this->trxRoundId !== false && $this->trxRoundId !== $fname ) { throw new DBTransactionError( @@ -273,8 +284,6 @@ abstract class LBFactory implements ILBFactory { "$fname: transaction round '{$this->trxRoundId}' still running" ); } - /** @noinspection PhpUnusedLocalVariableInspection */ - $scope = ScopedCallback::newScopedIgnoreUserAbort(); // try to ignore client aborts // Run pre-commit callbacks and suppress post-commit callbacks, aborting on failure do { $count = 0; // number of callbacks executed this iteration @@ -300,6 +309,9 @@ abstract class LBFactory implements ILBFactory { } final public function rollbackMasterChanges( $fname = __METHOD__ ) { + /** @noinspection PhpUnusedLocalVariableInspection */ + $scope = ScopedCallback::newScopedIgnoreUserAbort(); + $this->trxRoundStage = self::ROUND_ROLLING_BACK; $this->trxRoundId = false; // Actually perform the rollback on all master DB connections and revert DBO_TRX @@ -651,14 +663,6 @@ abstract class LBFactory implements ILBFactory { $this->indexAliases = $aliases; } - /** - * @param string $prefix - * @deprecated Since 1.33 - */ - public function setDomainPrefix( $prefix ) { - $this->setLocalDomainPrefix( $prefix ); - } - public function setLocalDomainPrefix( $prefix ) { $this->localDomain = new DatabaseDomain( $this->localDomain->getDatabase(), @@ -682,6 +686,9 @@ abstract class LBFactory implements ILBFactory { } public function closeAll() { + /** @noinspection PhpUnusedLocalVariableInspection */ + $scope = ScopedCallback::newScopedIgnoreUserAbort(); + $this->forEachLBCallMethod( 'closeAll' ); }