From 951f9f0efc740d8f75b512c90a6ae1a2fc187808 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Fri, 26 May 2017 10:39:59 +0200 Subject: [PATCH] Don't use global $CONFIG variable .. for compat. with Roundcube 1.4 --- plugins/kolab_addressbook/kolab_addressbook.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/kolab_addressbook/kolab_addressbook.php b/plugins/kolab_addressbook/kolab_addressbook.php index 22c5ccbc..a4d07f36 100644 --- a/plugins/kolab_addressbook/kolab_addressbook.php +++ b/plugins/kolab_addressbook/kolab_addressbook.php @@ -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