From 494504d537c1ec61291aa2f9155cca3476f473df Mon Sep 17 00:00:00 2001 From: thomasb Date: Mon, 22 Nov 2010 10:18:46 +0000 Subject: Move core Kolab functions to a separate plugin to be used by others too git-svn-id: https://svn.roundcube.net/trunk@4247 208e9e7b-5314-0410-a742-e7e81cd9613c --- plugins/kolab_addressbook/config.inc.php.dist | 8 -------- plugins/kolab_addressbook/kolab_addressbook.php | 14 ++++---------- 2 files changed, 4 insertions(+), 18 deletions(-) delete mode 100644 plugins/kolab_addressbook/config.inc.php.dist (limited to 'plugins/kolab_addressbook') diff --git a/plugins/kolab_addressbook/config.inc.php.dist b/plugins/kolab_addressbook/config.inc.php.dist deleted file mode 100644 index b6ac25a4d..000000000 --- a/plugins/kolab_addressbook/config.inc.php.dist +++ /dev/null @@ -1,8 +0,0 @@ -'; - -?> diff --git a/plugins/kolab_addressbook/kolab_addressbook.php b/plugins/kolab_addressbook/kolab_addressbook.php index 4c5a84e5f..807dfb8ec 100644 --- a/plugins/kolab_addressbook/kolab_addressbook.php +++ b/plugins/kolab_addressbook/kolab_addressbook.php @@ -6,10 +6,7 @@ require_once(dirname(__FILE__) . '/rcube_kolab_contacts.php'); * Kolab address book * * Sample plugin to add a new address book source with data from Kolab storage - * * This is work-in-progress for the Roundcube+Kolab integration. - * The library part is to be moved into a separate PEAR package or plugin - * that this and other Kolab-related plugins will depend on. * * @author Thomas Bruederli * @@ -24,17 +21,14 @@ class kolab_addressbook extends rcube_plugin */ public function init() { - // load local config - $this->load_config(); + // load required plugin + $this->require_plugin('kolab_core'); + // register hooks $this->add_hook('addressbooks_list', array($this, 'address_sources')); $this->add_hook('addressbook_get', array($this, 'get_address_book')); $this->add_hook('contact_form', array($this, 'contact_form')); - - // extend include path to load bundled Horde classes - $include_path = $this->home . '/lib' . PATH_SEPARATOR . ini_get('include_path'); - set_include_path($include_path); - + // extend list of address sources to be used for autocompletion $rcmail = rcmail::get_instance(); if ($rcmail->action == 'autocomplete' || $rcmail->action == 'group-expand') { -- cgit v1.2.3