summaryrefslogtreecommitdiff
path: root/roundcubemail/program/steps/addressbook/func.inc
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-09-02 07:42:46 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-09-02 07:42:46 +0000
commitd6bef1e39f44faa270dee193f05ae649605a1ad2 (patch)
tree44e05839ce96b6decb8681aa06368f5ad74220fe /roundcubemail/program/steps/addressbook/func.inc
parent13b4725150912f49837c3d2bc7412a3ee1df757a (diff)
Let rcmail class create address book instances
git-svn-id: https://svn.roundcube.net/trunk@1712 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/addressbook/func.inc')
-rw-r--r--roundcubemail/program/steps/addressbook/func.inc11
1 files changed, 1 insertions, 10 deletions
diff --git a/roundcubemail/program/steps/addressbook/func.inc b/roundcubemail/program/steps/addressbook/func.inc
index 98c56af78..c4fbab219 100644
--- a/roundcubemail/program/steps/addressbook/func.inc
+++ b/roundcubemail/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']);