From a5080a29d56d93102c11445b55989e80d6d228fc Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 27 Apr 2016 14:46:44 +0000 Subject: [PATCH] * CardDAV: SoGo and Busycontacts without all name- or organisation components use last value for missing ones eg. "N:Lastname;Firstname" would also set middle-name, prefix and sufix with "Firstname", same with "ORG:Organisation" would set department and position with "Organisation" --- addressbook/inc/class.addressbook_vcal.inc.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/addressbook/inc/class.addressbook_vcal.inc.php b/addressbook/inc/class.addressbook_vcal.inc.php index 8d03d3ec35..f006514afc 100644 --- a/addressbook/inc/class.addressbook_vcal.inc.php +++ b/addressbook/inc/class.addressbook_vcal.inc.php @@ -929,10 +929,8 @@ class addressbook_vcal extends addressbook_bo { if (!empty($fieldName)) { - if (is_scalar($vcardValues[$vcardKey]['values'][$fieldKey])) - { - $value = trim($vcardValues[$vcardKey]['values'][$fieldKey]); - } + $value = trim($vcardValues[$vcardKey]['values'][$fieldKey]); + if ($pref_tel && (($vcardKey == $pref_tel) || ($vcardValues[$vcardKey]['name'] == 'TEL') && ($vcardValues[$vcardKey]['value'] == $vcardValues[$pref_tel]['value'])))