forked from extern/egroupware
* eSync/Addressbook: for all-in-one addressbook only use add-default, if it is contained in addressbooks selected, otherwise use personal addressbook
This commit is contained in:
parent
caec90f104
commit
edb42dbfd2
@ -589,6 +589,13 @@ class addressbook_activesync implements activesync_plugin_write, activesync_plug
|
|||||||
$contact['owner'] = $account;
|
$contact['owner'] = $account;
|
||||||
$contact['private'] = (int)$is_private;
|
$contact['private'] = (int)$is_private;
|
||||||
}
|
}
|
||||||
|
// if default addressbook for new contacts is NOT synced --> use personal addressbook
|
||||||
|
elseif($GLOBALS['egw_info']['user']['preferences']['addressbook']['add_default'] &&
|
||||||
|
!in_array($GLOBALS['egw_info']['user']['preferences']['addressbook']['add_default'],
|
||||||
|
array_keys($this->get_addressbooks(null,false))))
|
||||||
|
{
|
||||||
|
$contact['owner'] = $GLOBALS['egw_info']['user']['account_id'];
|
||||||
|
}
|
||||||
if (!empty($id)) $contact['id'] = $id;
|
if (!empty($id)) $contact['id'] = $id;
|
||||||
$this->addressbook->fixup_contact($contact);
|
$this->addressbook->fixup_contact($contact);
|
||||||
$newid = $this->addressbook->save($contact);
|
$newid = $this->addressbook->save($contact);
|
||||||
|
Loading…
Reference in New Issue
Block a user