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 11:50:46 +00:00
parent 7630f59a13
commit 4cda10552e

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!
// 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'])
{
$contact['owner'] = $account;
$contact['private'] = $is_private;
$contact['private'] = (int)$is_private;
}
if (!empty($id)) $contact['id'] = $id;
$this->addressbook->fixup_contact($contact);