summaryrefslogtreecommitdiff
path: root/program/steps/mail/addcontact.inc
diff options
context:
space:
mode:
Diffstat (limited to 'program/steps/mail/addcontact.inc')
-rw-r--r--program/steps/mail/addcontact.inc13
1 files changed, 2 insertions, 11 deletions
diff --git a/program/steps/mail/addcontact.inc b/program/steps/mail/addcontact.inc
index 2dc406f84..380557766 100644
--- a/program/steps/mail/addcontact.inc
+++ b/program/steps/mail/addcontact.inc
@@ -23,17 +23,8 @@
if (!$OUTPUT->ajax_call)
return;
-$abook = $RCMAIL->config->get('default_addressbook');
-
-// Get configured addressbook
-$CONTACTS = $RCMAIL->get_address_book($abook, true);
-
-// Get first writeable addressbook if the configured doesn't exist
-// This can happen when user deleted the addressbook (e.g. Kolab folder)
-if ($abook == null || !is_object($CONTACTS)) {
- $source = reset($RCMAIL->get_address_sources(true));
- $CONTACTS = $RCMAIL->get_address_book($source['id'], true);
-}
+// Get default addressbook
+$CONTACTS = $RCMAIL->get_address_book(-1, true);
if (!empty($_POST['_address']) && is_object($CONTACTS))
{