Aleksander Machniak
2012-07-10 840b4dbeb81603ed44c30dc77be8eff98d7667c3
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))
{