Fix VTIMEZONE issue

This commit is contained in:
Jörg Lehrke 2010-02-16 15:45:27 +00:00
parent 3eb599a3a3
commit 269d034606

View File

@ -299,15 +299,21 @@ class calendar_ical extends calendar_boupdate
$horde_vtimezone->parsevCalendar($vtimezone,'VTIMEZONE'); $horde_vtimezone->parsevCalendar($vtimezone,'VTIMEZONE');
// DTSTART must be in local time! // DTSTART must be in local time!
$standard = $horde_vtimezone->findComponent('STANDARD'); $standard = $horde_vtimezone->findComponent('STANDARD');
$dtstart = $standard->getAttribute('DTSTART'); if (is_a($standard, 'Horde_iCalendar'))
$dtstart = new egw_time($dtstart, egw_time::$server_timezone); {
$dtstart->setTimezone(self::$tz_cache[$tzid]); $dtstart = $standard->getAttribute('DTSTART');
$standard->setAttribute('DTSTART', $dtstart->format('Ymd\THis'), array(), false); $dtstart = new egw_time($dtstart, egw_time::$server_timezone);
$dtstart->setTimezone(self::$tz_cache[$tzid]);
$standard->setAttribute('DTSTART', $dtstart->format('Ymd\THis'), array(), false);
}
$daylight = $horde_vtimezone->findComponent('DAYLIGHT'); $daylight = $horde_vtimezone->findComponent('DAYLIGHT');
$dtstart = $daylight->getAttribute('DTSTART'); if (is_a($daylight, 'Horde_iCalendar'))
$dtstart = new egw_time($dtstart, egw_time::$server_timezone); {
$dtstart->setTimezone(self::$tz_cache[$tzid]); $dtstart = $daylight->getAttribute('DTSTART');
$daylight->setAttribute('DTSTART', $dtstart->format('Ymd\THis'), array(), false); $dtstart = new egw_time($dtstart, egw_time::$server_timezone);
$dtstart->setTimezone(self::$tz_cache[$tzid]);
$daylight->setAttribute('DTSTART', $dtstart->format('Ymd\THis'), array(), false);
}
$vcal->addComponent($horde_vtimezone); $vcal->addComponent($horde_vtimezone);
$vtimezones_added[] = $tzid; $vtimezones_added[] = $tzid;
} }
@ -2153,11 +2159,16 @@ class calendar_ical extends calendar_boupdate
{ {
$attributes['params']['ROLE'] = 'CHAIR'; $attributes['params']['ROLE'] = 'CHAIR';
} }
// add quantity and role if (!isset($event['participants'][$uid]) ||
$event['participants'][$uid] = $event['participants'][$uid][0] != 'A')
calendar_so::combine_status($status, {
$attributes['params']['X-EGROUPWARE-QUANTITY'], // for multiple entries the ACCEPT wins
$attributes['params']['ROLE']); // add quantity and role
$event['participants'][$uid] =
calendar_so::combine_status($status,
$attributes['params']['X-EGROUPWARE-QUANTITY'],
$attributes['params']['ROLE']);
}
break; break;
case 'ORGANIZER': case 'ORGANIZER':