From e45edd6ae20042df2931f6c01fba9111e387741c Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Wed, 30 Oct 2013 12:25:01 +0100 Subject: [PATCH] Use addPlugin! (esp. XMPP folks should do this) If you're using XMPP by setting $config['xmpp'][*] then you should do: addPlugin('Xmpp', $config['xmpp']); because setting it directly in $config[''] won't do anything. Also, default resource for XMPP is now 'gnusocial'. If you want something more random, set it in your addPlugin config array. --- lib/default.php | 11 ----------- lib/statusnet.php | 27 --------------------------- plugins/Xmpp/XmppPlugin.php | 2 +- 3 files changed, 1 insertion(+), 39 deletions(-) diff --git a/lib/default.php b/lib/default.php index 431eb6d9e6..55ef65e81f 100644 --- a/lib/default.php +++ b/lib/default.php @@ -172,17 +172,6 @@ $default = array('enabled' => false, // whether to throttle edits; false by default 'count' => 20, // number of allowed messages in timespan 'timespan' => 600), // timespan for throttling - 'xmpp' => - array('enabled' => false, - 'server' => 'INVALID SERVER', - 'port' => 5222, - 'user' => 'update', - 'encryption' => true, - 'resource' => 'uniquename', - 'password' => 'blahblahblah', - 'host' => null, # only set if != server - 'debug' => false, # print extra debug info - 'public' => array()), # JIDs of users who want to receive the public stream 'invite' => array('enabled' => true), 'tag' => diff --git a/lib/statusnet.php b/lib/statusnet.php index 56ac0cb1d3..432c5b8a20 100644 --- a/lib/statusnet.php +++ b/lib/statusnet.php @@ -379,33 +379,6 @@ class StatusNet $config_files); } - // Backwards compatibility - if (array_key_exists('memcached', $config)) { - if ($config['memcached']['enabled']) { - addPlugin('Memcache', array('servers' => $config['memcached']['server'])); - } - - if (!empty($config['memcached']['base'])) { - $config['cache']['base'] = $config['memcached']['base']; - } - } - - if (array_key_exists('xmpp', $config)) { - if ($config['xmpp']['enabled']) { - addPlugin('xmpp', array( - 'server' => $config['xmpp']['server'], - 'port' => $config['xmpp']['port'], - 'user' => $config['xmpp']['user'], - 'resource' => $config['xmpp']['resource'], - 'encryption' => $config['xmpp']['encryption'], - 'password' => $config['xmpp']['password'], - 'host' => $config['xmpp']['host'], - 'debug' => $config['xmpp']['debug'], - 'public' => $config['xmpp']['public'] - )); - } - } - // Check for database server; must exist! if (empty($config['db']['database'])) { diff --git a/plugins/Xmpp/XmppPlugin.php b/plugins/Xmpp/XmppPlugin.php index 0c414998e0..17e8b8d50a 100644 --- a/plugins/Xmpp/XmppPlugin.php +++ b/plugins/Xmpp/XmppPlugin.php @@ -49,7 +49,7 @@ class XmppPlugin extends ImPlugin public $server = null; public $port = 5222; public $user = 'update'; - public $resource = null; + public $resource = 'gnusocial'; public $encryption = true; public $password = null; public $host = null; // only set if != server -- 2.39.5