"Fix to never store private accounts, as they are always public (seems to be still the case for SyncML) "

This commit is contained in:
Ralf Becker 2008-03-10 07:00:32 +00:00
parent 9993be3eed
commit 7e9c82ce64

View File

@ -480,7 +480,7 @@ class bocontacts extends socontacts
} }
} }
} }
if (!$isUpdate) else
{ {
// if no owner/addressbook set use the setting of the add_default prefs (if set, otherwise the users personal addressbook) // if no owner/addressbook set use the setting of the add_default prefs (if set, otherwise the users personal addressbook)
if (!isset($contact['owner'])) $contact['owner'] = $this->default_addressbook; if (!isset($contact['owner'])) $contact['owner'] = $this->default_addressbook;
@ -491,6 +491,10 @@ class bocontacts extends socontacts
if (!$contact['tid']) $contact['tid'] = 'n'; if (!$contact['tid']) $contact['tid'] = 'n';
} }
if (!$contact['owner'])
{
$contact['private'] = 0; // accounts are never private!
}
if(!$ignore_acl && !$this->check_perms($isUpdate ? EGW_ACL_EDIT : EGW_ACL_ADD,$contact)) if(!$ignore_acl && !$this->check_perms($isUpdate ? EGW_ACL_EDIT : EGW_ACL_ADD,$contact))
{ {
$this->error = 'access denied'; $this->error = 'access denied';