From 3d816ed6f584488aad56a70e8437c0c6bbc6d28a Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 20 Jul 2015 15:41:20 +0000 Subject: [PATCH] * CardDAV/Addresbook: contacts containing photos were broken and iOS showed phone number labels like "WORK instead of work --- addressbook/inc/class.addressbook_vcal.inc.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/addressbook/inc/class.addressbook_vcal.inc.php b/addressbook/inc/class.addressbook_vcal.inc.php index e9508342d4..865acaf00a 100644 --- a/addressbook/inc/class.addressbook_vcal.inc.php +++ b/addressbook/inc/class.addressbook_vcal.inc.php @@ -319,6 +319,8 @@ class addressbook_vcal extends addressbook_bo $options['ENCODING'] = 'BASE64'; } $hasdata++; + // need to encode binary image, not done in Horde Icalendar + $value = base64_encode($value); } else { @@ -480,7 +482,11 @@ class addressbook_vcal extends addressbook_bo $vCard->setAttribute($vcardField, $value, $options, true, $values); } - $result = $vCard->exportvCalendar($_charset); + // current iOS 8.4 shows TEL;TYPE="WORK,VOICE":+49 123 4567890 as '"WORK' + // old (patched) Horde iCalendar, did not enclosed parameter in quotes + $result = preg_replace('/^TEL;TYPE="([^"]+)":/m', 'TEL;TYPE=$1:', + $vCard->exportvCalendar($_charset)); + if ($this->log) { error_log(__FILE__.'['.__LINE__.'] '.__METHOD__ .