X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fxmppmanager.php;h=cca54db08da4b4a016354ffa1b685564c9900fe8;hb=6274c3977d25a1ca9313cc851230b9b520bd4197;hp=985e7c32e45c4a5c4aba8c247126ecdd191ccece;hpb=94aca655ef4128859285b86a78f85537aa9848e8;p=quix0rs-gnu-social.git diff --git a/lib/xmppmanager.php b/lib/xmppmanager.php index 985e7c32e4..cca54db08d 100644 --- a/lib/xmppmanager.php +++ b/lib/xmppmanager.php @@ -36,6 +36,7 @@ class XmppManager extends IoManager protected $site = null; protected $pingid = 0; protected $lastping = null; + protected $conn = null; static protected $singletons = array(); @@ -48,7 +49,7 @@ class XmppManager extends IoManager public static function get() { if (common_config('xmpp', 'enabled')) { - $site = common_config('site', 'server'); + $site = StatusNet::currentSite(); if (empty(self::$singletons[$site])) { self::$singletons[$site] = new XmppManager(); } @@ -69,7 +70,7 @@ class XmppManager extends IoManager function __construct() { - $this->site = common_config('site', 'server'); + $this->site = StatusNet::currentSite(); $this->resource = common_config('xmpp', 'resource') . 'daemon'; } @@ -476,10 +477,10 @@ class XmppManager extends IoManager */ protected function switchSite() { - if ($this->site != common_config('site', 'server')) { + if ($this->site != StatusNet::currentSite()) { common_log(LOG_DEBUG, __METHOD__ . ": switching to site $this->site"); $this->stats('switch'); - StatusNet::init($this->site); + StatusNet::switchSite($this->site); } } }