From: Aaron Schulz Date: Mon, 19 Sep 2016 22:13:43 +0000 (-0700) Subject: Fix "externalCluster" LBFactorySimple setting in LBFactoryMW X-Git-Tag: 1.31.0-rc.0~5470^2 X-Git-Url: http://git.cyclocoop.org/data/Fool?a=commitdiff_plain;h=71e9cb84c7b4773abcc58d765198a598ad5657d1;p=lhc%2Fweb%2Fwiklou.git Fix "externalCluster" LBFactorySimple setting in LBFactoryMW Fixes regression from d175b391ae2a Change-Id: I4bbc875e2fcd021e342959a37475ec356cb58cce --- diff --git a/includes/db/loadbalancer/LBFactoryMW.php b/includes/db/loadbalancer/LBFactoryMW.php index e943a8ab40..f8647a37c3 100644 --- a/includes/db/loadbalancer/LBFactoryMW.php +++ b/includes/db/loadbalancer/LBFactoryMW.php @@ -94,8 +94,8 @@ abstract class LBFactoryMW { } $lbConf['servers'] = [ $server ]; } - if ( !isset( $lbConf['externalServers'] ) ) { - $lbConf['externalServers'] = $mainConfig->get( 'ExternalServers' ); + if ( !isset( $lbConf['externalClusters'] ) ) { + $lbConf['externalClusters'] = $mainConfig->get( 'ExternalServers' ); } } elseif ( $lbConf['class'] === 'LBFactoryMulti' ) { if ( isset( $lbConf['serverTemplate'] ) ) { diff --git a/includes/libs/rdbms/lbfactory/LBFactorySimple.php b/includes/libs/rdbms/lbfactory/LBFactorySimple.php index 0476cf22af..0949092546 100644 --- a/includes/libs/rdbms/lbfactory/LBFactorySimple.php +++ b/includes/libs/rdbms/lbfactory/LBFactorySimple.php @@ -87,7 +87,7 @@ class LBFactorySimple extends LBFactory { */ protected function newExternalLB( $cluster, $domain = false ) { if ( !isset( $this->externalClusters[$cluster] ) ) { - throw new InvalidArgumentException( __METHOD__ . ": Unknown cluster \"$cluster\"" ); + throw new InvalidArgumentException( __METHOD__ . ": Unknown cluster \"$cluster\"." ); } return $this->newLoadBalancer( $this->externalClusters[$cluster] );