Don't use global $CONFIG variable

.. for compat. with Roundcube 1.4
This commit is contained in:
Aleksander Machniak 2017-05-26 10:39:59 +02:00
parent f357819dd0
commit 951f9f0efc

View file

@ -339,13 +339,16 @@ class kolab_addressbook extends rcube_plugin
*/
public function config_get($args)
{
if ($args['name'] != 'autocomplete_addressbooks') {
if ($args['name'] != 'autocomplete_addressbooks' || $this->recurrent) {
return $args;
}
$abook_prio = $this->addressbook_prio();
// here we cannot use rc->config->get()
$sources = $GLOBALS['CONFIG']['autocomplete_addressbooks'];
// Get the original setting, use temp flag to prevent from an infinite recursion
$this->recurrent = true;
$sources = $this->rc->config->get('autocomplete_addressbooks');
$this->recurrent = false;
// Disable all global address books
// Assumes that all non-kolab_addressbook sources are global