getExternalLB( $wgEchoCluster ); } else { self::$lb = wfGetLB( $wiki ); } } } /** * Wrapper function for wfGetDB * * @param $db int Index of the connection to get * @param $groups mixed Query groups. * @param $wiki string The wiki ID, or false for the current wiki * @return DatabaseBase */ public static function getDB( $db, $groups = array(), $wiki = false ) { if ( !isset( self::$cache[$db] ) ) { self::initLB( $wiki ); self::$cache[$db] = self::$lb->getConnection( $db, $groups, $wiki ); } return self::$cache[$db]; } }