summaryrefslogtreecommitdiff
path: root/program/steps/addressbook/func.inc
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2008-09-02 07:42:46 +0000
committerthomascube <thomas@roundcube.net>2008-09-02 07:42:46 +0000
commitade8e117dfbb62f6dbd16b4aca81dfbdbd054579 (patch)
tree6d67359f797e4bdb976f7a446713499224ae02ee /program/steps/addressbook/func.inc
parente7f85bd27474e1b1bbb9522dd019f8bbe3ca7bd1 (diff)
Let rcmail class create address book instances
Diffstat (limited to 'program/steps/addressbook/func.inc')
-rw-r--r--program/steps/addressbook/func.inc11
1 files changed, 1 insertions, 10 deletions
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']);