summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2014-03-13 17:44:36 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2014-03-13 17:46:04 (GMT)
commit1a5d37bdc036f3d062d70cce59dde5988bbaafcc (patch)
tree2aba0b9184864cab527c44a1e7f404898ec028b7
parent7a1b9ef62b81d1e05c46b55a853e09cccd31b007 (diff)
downloadiRony-1a5d37bdc036f3d062d70cce59dde5988bbaafcc.tar.gz
Fix fatal error when saving mailto: group members; fix output encoding of group members
-rw-r--r--lib/Kolab/CardDAV/ContactsBackend.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Kolab/CardDAV/ContactsBackend.php b/lib/Kolab/CardDAV/ContactsBackend.php
index c9ff807..cb0c448 100644
--- a/lib/Kolab/CardDAV/ContactsBackend.php
+++ b/lib/Kolab/CardDAV/ContactsBackend.php
@@ -648,9 +648,9 @@ class ContactsBackend extends CardDAV\Backend\AbstractBackend
if ($member['uid'])
$value = 'urn:uuid:' . $member['uid'];
else if ($member['email'] && $member['name'])
- $value = urlencode(sprintf('mailto:"%s" <%s>', addcslashes($member['name'], '"'), $member['email']));
+ $value = 'mailto:' . urlencode(sprintf('"%s" <%s>', addcslashes($member['name'], '"'), $member['email']));
else if ($member['email'])
- $value = urlencode('mailto:' . $member['email']);
+ $value = 'mailto:' . $member['email'];
$vc->add($prop_prefix . 'MEMBER', $value);
}
}
@@ -926,9 +926,9 @@ class ContactsBackend extends CardDAV\Backend\AbstractBackend
$contact['member'][] = array('uid' => substr($prop->value, 9));
}
else if (strpos($prop->value, 'mailto:') === 0) {
- $member = reset(\rcube_mime::parse_address_list(urldecode(substr($prop->value, 7))));
- if ($member['address'])
- $contact['member'][] = array('email' => $member['address'], 'name' => $member['name']);
+ $member = reset(\rcube_mime::decode_address_list(urldecode(substr($prop->value, 7))));
+ if ($member['mailto'])
+ $contact['member'][] = array('email' => $member['mailto'], 'name' => $member['name']);
}
break;