mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-07 06:29:49 +01:00
Fix iCal attendee CN issue
This commit is contained in:
parent
328f92cedf
commit
7de0936dbb
@ -456,10 +456,13 @@ class calendar_ical extends calendar_boupdate
|
|||||||
error_log(__FILE__.'['.__LINE__.'] '.__METHOD__ .
|
error_log(__FILE__.'['.__LINE__.'] '.__METHOD__ .
|
||||||
'()attendee:' . array2string($info) ."\n",3,$this->logfile);
|
'()attendee:' . array2string($info) ."\n",3,$this->logfile);
|
||||||
}
|
}
|
||||||
$participantCN = '"' . (empty($info['cn']) ? $info['name'] : $info['cn']) . '"';
|
$participantCN = trim(empty($info['cn']) ? $info['name'] : $info['cn']);
|
||||||
|
$participantCN = str_replace(array('\\', ',', ';', ':'),
|
||||||
|
array('\\\\', '\\,', '\\;', '\\:'),
|
||||||
|
$participantCN);
|
||||||
if ($version == '1.0')
|
if ($version == '1.0')
|
||||||
{
|
{
|
||||||
$participantURL = trim($participantCN . (empty($info['email']) ? '' : ' <' . $info['email'] .'>'));
|
$participantURL = trim('"' . $participantCN . '"' . (empty($info['email']) ? '' : ' <' . $info['email'] .'>'));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2554,7 +2557,9 @@ class calendar_ical extends calendar_boupdate
|
|||||||
// ... and for provided CN
|
// ... and for provided CN
|
||||||
if (!empty($attributes['params']['CN']))
|
if (!empty($attributes['params']['CN']))
|
||||||
{
|
{
|
||||||
$cn = $attributes['params']['CN'];
|
$cn = str_replace(array('\\,', '\\;', '\\:', '\\\\'),
|
||||||
|
array(',', ';', ':', '\\'),
|
||||||
|
$attributes['params']['CN']);
|
||||||
if ($cn[0] == '"' && substr($cn,-1) == '"')
|
if ($cn[0] == '"' && substr($cn,-1) == '"')
|
||||||
{
|
{
|
||||||
$cn = substr($cn,1,-1);
|
$cn = substr($cn,1,-1);
|
||||||
|
Loading…
Reference in New Issue
Block a user