addressbook/esync: make sure private is set (with 0 or 1); as an contact_private set to NULL within the database is invisible to the users

This commit is contained in:
Klaus Leithoff 2012-01-05 12:24:04 +00:00
parent 65a5aca94f
commit 8b9bd33ad4

View File

@ -583,10 +583,11 @@ class addressbook_activesync implements activesync_plugin_write, activesync_plug
} }
// for all-in-one addressbook, account is meaningless and wrong! // for all-in-one addressbook, account is meaningless and wrong!
// addressbook_bo::save() keeps the owner or sets an appropriate one if none given // addressbook_bo::save() keeps the owner or sets an appropriate one if none given
if (!isset($contact['private'])) $contact['private'] = (int)$is_private;
if (!$GLOBALS['egw_info']['user']['preferences']['activesync']['addressbook-all-in-one']) if (!$GLOBALS['egw_info']['user']['preferences']['activesync']['addressbook-all-in-one'])
{ {
$contact['owner'] = $account; $contact['owner'] = $account;
$contact['private'] = $is_private; $contact['private'] = (int)$is_private;
} }
if (!empty($id)) $contact['id'] = $id; if (!empty($id)) $contact['id'] = $id;
$this->addressbook->fixup_contact($contact); $this->addressbook->fixup_contact($contact);