diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-03-02 14:35:53 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-03-02 14:35:53 +0000 |
| commit | e05a4682c32805c3cff9d99d950c02dc9e77811e (patch) | |
| tree | 381065423b722bf55ab93c2cf817d59075ca1dea /roundcubemail/program/steps | |
| parent | 80f377e7228e8f95037126c65ad59816960b398d (diff) | |
- Added function to get addressbooks list rcmail::get_address_sources() (#1486248)
git-svn-id: https://svn.roundcube.net/trunk@3302 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps')
| -rw-r--r-- | roundcubemail/program/steps/addressbook/func.inc | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/roundcubemail/program/steps/addressbook/func.inc b/roundcubemail/program/steps/addressbook/func.inc index ebf5546db..ca1fd03fc 100644 --- a/roundcubemail/program/steps/addressbook/func.inc +++ b/roundcubemail/program/steps/addressbook/func.inc @@ -20,18 +20,7 @@ */ // add list of address sources to client env -$js_list = array(); -if (strtolower($CONFIG['address_book_type']) != 'ldap') { - // We are using the DB address book, add it. - $js_list['0'] = array('id' => 0, 'name' => rcube_label('personaladrbook'), 'readonly' => false); -} -if (is_array($CONFIG['ldap_public'])) { - foreach ($CONFIG['ldap_public'] as $id => $prop) - $js_list[$id] = array('id' => $id, 'name' => $prop['name'], 'readonly' => !$prop['writable']); -} - -$plugin = $RCMAIL->plugins->exec_hook('address_sources', array('sources' => $js_list)); -$js_list = $plugin['sources']; +$js_list = $RCMAIL->get_address_sources(); // select source $source = get_input_value('_source', RCUBE_INPUT_GPC); @@ -40,7 +29,6 @@ $source = get_input_value('_source', RCUBE_INPUT_GPC); if (empty($source)) $source = $js_list[key($js_list)]['id']; - // instantiate a contacts object according to the given source $CONTACTS = $RCMAIL->get_address_book($source); |
