From: <ral...@us...> - 2011-04-28 17:56:52
|
Author: ralfbecker Date: Thu Apr 28 19:56:44 2011 New Revision: 34799 URL: http://www.egroupware.org/viewvc/egroupware?rev=34799&view=rev Log: return parsed organizer, as we need it in AS and it does not hurt other users of ical class Modified: trunk/calendar/inc/class.calendar_ical.inc.php Modified: trunk/calendar/inc/class.calendar_ical.inc.php URL: http://www.egroupware.org/viewvc/egroupware/trunk/calendar/inc/class.calendar_ical.inc.php?rev=34799&r1=34798&r2=34799&view=diff ============================================================================== --- trunk/calendar/inc/class.calendar_ical.inc.php (original) +++ trunk/calendar/inc/class.calendar_ical.inc.php Thu Apr 28 19:56:44 2011 @@ -2166,7 +2166,7 @@ { if (($event = $this->_ical2egw_callback($component,$this->tzid,$principalURL))) { - $events[] = $event; + $events[] = $event; } } date_default_timezone_set($GLOBALS['egw_info']['server']['server_timezone']); @@ -2668,8 +2668,18 @@ $vcardData['category'] = array(); } break; + case 'ORGANIZER': + $event['organizer'] = $attributes['value']; // no egw field, but needed in AS + if (strtoupper(substr($event['organizer'],0,7)) == 'MAILTO:') + { + $event['organizer'] = substr($event['organizer'],7); + } + if (!empty($attributes['params']['CN'])) + { + $event['organizer'] = $attributes['params']['CN'].' <'.$event['organizer'].'>'; + } + // fall throught case 'ATTENDEE': - case 'ORGANIZER': if (isset($attributes['params']['PARTSTAT'])) { $attributes['params']['STATUS'] = $attributes['params']['PARTSTAT']; |