From: jenkins-bot Date: Mon, 29 Aug 2016 16:47:04 +0000 (+0000) Subject: Merge "Fix shutdown() code duplication in LBFactory" X-Git-Tag: 1.31.0-rc.0~5853 X-Git-Url: http://git.cyclocoop.org//%27http:/code.google.com/p/ie7-js//%27?a=commitdiff_plain;h=4fa6af98f9b258a8e2b9d949f88b443e8a153922;hp=8c807b8f1f6f8bee9649f7789eef728445ece1b0;p=lhc%2Fweb%2Fwiklou.git Merge "Fix shutdown() code duplication in LBFactory" --- diff --git a/includes/db/loadbalancer/LBFactory.php b/includes/db/loadbalancer/LBFactory.php index f560cf17ab..84f7fcb3d2 100644 --- a/includes/db/loadbalancer/LBFactory.php +++ b/includes/db/loadbalancer/LBFactory.php @@ -196,9 +196,12 @@ abstract class LBFactory implements DestructibleService { /** * Prepare all tracked load balancers for shutdown * @param integer $flags Supports SHUTDOWN_* flags - * STUB */ public function shutdown( $flags = 0 ) { + if ( !( $flags & self::SHUTDOWN_NO_CHRONPROT ) ) { + $this->shutdownChronologyProtector( $this->chronProt ); + } + $this->commitMasterChanges( __METHOD__ ); // sanity } /** diff --git a/includes/db/loadbalancer/LBFactoryMulti.php b/includes/db/loadbalancer/LBFactoryMulti.php index 4b9cccc86a..f201081389 100644 --- a/includes/db/loadbalancer/LBFactoryMulti.php +++ b/includes/db/loadbalancer/LBFactoryMulti.php @@ -418,11 +418,4 @@ class LBFactoryMulti extends LBFactory { call_user_func_array( $callback, array_merge( [ $lb ], $params ) ); } } - - public function shutdown( $flags = 0 ) { - if ( !( $flags & self::SHUTDOWN_NO_CHRONPROT ) ) { - $this->shutdownChronologyProtector( $this->chronProt ); - } - $this->commitMasterChanges( __METHOD__ ); // sanity - } } diff --git a/includes/db/loadbalancer/LBFactorySimple.php b/includes/db/loadbalancer/LBFactorySimple.php index 3702c8b05d..c7c4752c6b 100644 --- a/includes/db/loadbalancer/LBFactorySimple.php +++ b/includes/db/loadbalancer/LBFactorySimple.php @@ -159,11 +159,4 @@ class LBFactorySimple extends LBFactory { call_user_func_array( $callback, array_merge( [ $lb ], $params ) ); } } - - public function shutdown( $flags = 0 ) { - if ( !( $flags & self::SHUTDOWN_NO_CHRONPROT ) ) { - $this->shutdownChronologyProtector( $this->chronProt ); - } - $this->commitMasterChanges( __METHOD__ ); // sanity - } }