From ade8e117dfbb62f6dbd16b4aca81dfbdbd054579 Mon Sep 17 00:00:00 2001 From: thomascube <thomas@roundcube.net> Date: Tue, 02 Sep 2008 03:42:46 -0400 Subject: [PATCH] Let rcmail class create address book instances --- program/steps/addressbook/func.inc | 11 +---------- 1 files changed, 1 insertions(+), 10 deletions(-) diff --git a/program/steps/addressbook/func.inc b/program/steps/addressbook/func.inc index 98c56af..c4fbab2 100644 --- a/program/steps/addressbook/func.inc +++ b/program/steps/addressbook/func.inc @@ -20,16 +20,7 @@ */ // instantiate a contacts object according to the given source -if (($source = get_input_value('_source', RCUBE_INPUT_GPC)) && isset($CONFIG['ldap_public'][$source])) - $CONTACTS = new rcube_ldap($CONFIG['ldap_public'][$source]); -else if (strtolower($CONFIG['address_book_type']) == 'ldap') { - // Get the first LDAP address book. - $source = key((array)$CONFIG['ldap_public']); - $prop = current((array)$CONFIG['ldap_public']); - $CONTACTS = new rcube_ldap($prop); -} else { - $CONTACTS = new rcube_contacts($DB, $_SESSION['user_id']); -} // end else +$CONTACTS = $RCMAIL->get_address_book(($source = get_input_value('_source', RCUBE_INPUT_GPC))); $CONTACTS->set_pagesize($CONFIG['pagesize']); -- Gitblit v1.9.1