From 15e379249f883cdc7d12d87852b96c0c3cf19c10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Lehrke?= Date: Mon, 12 Apr 2010 07:20:11 +0000 Subject: [PATCH] Fix group participant issue --- calendar/inc/class.calendar_ical.inc.php | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/calendar/inc/class.calendar_ical.inc.php b/calendar/inc/class.calendar_ical.inc.php index 12f37de880..eefe039f58 100644 --- a/calendar/inc/class.calendar_ical.inc.php +++ b/calendar/inc/class.calendar_ical.inc.php @@ -2642,10 +2642,10 @@ class calendar_ical extends calendar_boupdate // ... and for provided CN if (!empty($attributes['params']['CN'])) { - if ($attributes['params']['CN'][0] == '"' - && substr($attributes['params']['CN'],-1) == '"') + $cn = $attributes['params']['CN']; + if ($cn[0] == '"' && substr($cn,-1) == '"') { - $cn = substr($attributes['params']['CN'],1,-1); + $cn = substr($cn,1,-1); } $searcharray['n_fn'] = $cn; } @@ -2654,9 +2654,21 @@ class calendar_ical extends calendar_boupdate $searcharray['n_fn'] = $cn; } + if ($this->log) + { + error_log(__FILE__.'['.__LINE__.'] '.__METHOD__ + . "() Search participant: '$cn', '$email'\n",3,$this->logfile); + } + //elseif (//$attributes['params']['CUTYPE'] == 'GROUP' if (preg_match('/(.*) '. lang('Group') . '/', $cn, $matches)) { + // we found a group + if ($this->log) + { + error_log(__FILE__.'['.__LINE__.'] '.__METHOD__ + . "() Found group: '$matches[1]', '$cn', '$email'\n",3,$this->logfile); + } if (($uid = $GLOBALS['egw']->accounts->name2id($matches[1], 'account_lid', 'g'))) { //Horde::logMessage("vevent2egw: group participant $uid",