* @param string $cluster External storage cluster, or false for core
* @param string $wiki Wiki ID, or false for the current wiki
*/
- abstract function getExternalLB( $cluster, $wiki = false );
+ abstract function &getExternalLB( $cluster, $wiki = false );
/**
* Execute a function for each tracked load balancer
return $this->mainLB;
}
- function getExternalLB( $cluster, $wiki = false ) {
+ function &getExternalLB( $cluster, $wiki = false ) {
global $wgExternalServers;
if ( !isset( $this->extLBs[$cluster] ) ) {
if ( !isset( $wgExternalServers[$cluster] ) ) {
return $this->mainLBs[$section];
}
- function getExternalLB( $cluster, $wiki = false ) {
- global $wgExternalServers;
+ function &getExternalLB( $cluster, $wiki = false ) {
if ( !isset( $this->extLBs[$cluster] ) ) {
if ( !isset( $this->externalLoads[$cluster] ) ) {
throw new MWException( __METHOD__.": Unknown cluster \"$cluster\"" );