From b3310367154dc950ce056b111e9f0e0baf2c6c58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cornelius=20Wei=C3=9F?= Date: Mon, 2 Jul 2007 18:35:39 +0000 Subject: [PATCH] fix: privat flag not working with syncML --- addressbook/inc/class.bocontacts.inc.php | 5 ++++- addressbook/inc/class.vcaladdressbook.inc.php | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/addressbook/inc/class.bocontacts.inc.php b/addressbook/inc/class.bocontacts.inc.php index 0896f44525..6b1eb6d167 100755 --- a/addressbook/inc/class.bocontacts.inc.php +++ b/addressbook/inc/class.bocontacts.inc.php @@ -443,7 +443,10 @@ class bocontacts extends socontacts if (($old = $this->read($contact['id']))) // --> try reading the old entry and set it from there { $contact['owner'] = $old['owner']; - $contact['private'] = $old['private']; + if(!isset($contact['private'])) + { + $contact['private'] = $old['private']; + } } else // entry not found --> create a new one { diff --git a/addressbook/inc/class.vcaladdressbook.inc.php b/addressbook/inc/class.vcaladdressbook.inc.php index eb0ab19bd2..3bcb60f71b 100644 --- a/addressbook/inc/class.vcaladdressbook.inc.php +++ b/addressbook/inc/class.vcaladdressbook.inc.php @@ -555,7 +555,7 @@ class vcaladdressbook extends bocontacts break; case 'private': - $contact[$fieldName] = (int) $vcardValues[$vcardKey]['values'][$fieldKey] == 'PRIVATE'; + (int)$contact[$fieldName] = $vcardValues[$vcardKey]['values'][$fieldKey] == 'PRIVATE'; break; case 'cat_id': @@ -586,7 +586,6 @@ class vcaladdressbook extends bocontacts } $contact['n_fn'] = trim($contact['n_given'].' '.$contact['n_family']); - return $contact; }