From 7e9c82ce645a3fdf4014ea2bd3b921d08f5f0b9b Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 10 Mar 2008 07:00:32 +0000 Subject: [PATCH] "Fix to never store private accounts, as they are always public (seems to be still the case for SyncML) " --- addressbook/inc/class.bocontacts.inc.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/addressbook/inc/class.bocontacts.inc.php b/addressbook/inc/class.bocontacts.inc.php index 454a8c8324..edd4a9c5cb 100755 --- a/addressbook/inc/class.bocontacts.inc.php +++ b/addressbook/inc/class.bocontacts.inc.php @@ -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 (!isset($contact['owner'])) $contact['owner'] = $this->default_addressbook; @@ -491,6 +491,10 @@ class bocontacts extends socontacts 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)) { $this->error = 'access denied';