From ade8e117dfbb62f6dbd16b4aca81dfbdbd054579 Mon Sep 17 00:00:00 2001 From: thomascube Date: Tue, 2 Sep 2008 07:42:46 +0000 Subject: Let rcmail class create address book instances --- program/steps/addressbook/func.inc | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'program/steps/addressbook/func.inc') diff --git a/program/steps/addressbook/func.inc b/program/steps/addressbook/func.inc index 98c56af78..c4fbab219 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']); -- cgit v1.2.3