mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-08 14:30:05 +01:00
Fix EXDATE issue for Apple devices and enddate issue for iPhone
This commit is contained in:
parent
f8d882f372
commit
00d52b33c5
@ -619,8 +619,19 @@ class calendar_ical extends calendar_boupdate
|
||||
$rrule = $rriter->generate_rrule($version);
|
||||
if ($event['recur_enddate'])
|
||||
{
|
||||
$length = ($event['end'] - $event['start']) / 2;
|
||||
$rrule['UNTIL']->modify($length . ' second');
|
||||
if ($this->productManufacturer == 'groupdav' && $this->productName == 'iphone')
|
||||
{
|
||||
// Fix iPhone issue
|
||||
$length = ($event['end'] - $event['start']);
|
||||
$rrule['UNTIL']->modify($length . ' second');
|
||||
$rrule['UNTIL']->setTime(23, 59, 59);
|
||||
}
|
||||
else
|
||||
{
|
||||
$length = ($event['end'] - $event['start']) / 2;
|
||||
$rrule['UNTIL']->modify($length . ' second');
|
||||
}
|
||||
|
||||
if (!$tzid || $version != '1.0')
|
||||
{
|
||||
if (!isset(self::$tz_cache['UTC']))
|
||||
@ -652,16 +663,19 @@ class calendar_ical extends calendar_boupdate
|
||||
{
|
||||
if (empty($event['whole_day']))
|
||||
{
|
||||
$value_type = 'DATE-TIME';
|
||||
foreach ($event['recur_exception'] as $key => $timestamp)
|
||||
{
|
||||
$event['recur_exception'][$key] = self::getDateTime($timestamp,$tzid,$parameters['EXDATE']);
|
||||
}
|
||||
if ($version != '1.0')
|
||||
{
|
||||
$parameters['EXDATE']['VALUE'] = 'DATE-TIME';
|
||||
if (!empty($tzid)) $parameters['EXDATE']['TZID'] = $tzid;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// use 'DATE' instead of 'DATE-TIME' on whole day events
|
||||
$value_type = 'DATE';
|
||||
foreach ($event['recur_exception'] as $id => $timestamp)
|
||||
{
|
||||
$time = new egw_time($timestamp,egw_time::$server_timezone);
|
||||
@ -674,13 +688,20 @@ class calendar_ical extends calendar_boupdate
|
||||
);
|
||||
}
|
||||
$event['recur_exception'] = $days;
|
||||
if ($version != '1.0') $parameters['EXDATE']['VALUE'] = 'DATE';
|
||||
}
|
||||
|
||||
$attributes['EXDATE'] = '';
|
||||
$values['EXDATE'] = $event['recur_exception'];
|
||||
if ($version != '1.0')
|
||||
if ($this->productManufacturer == 'groupdav' &&
|
||||
($this->productName == 'iphone' || $this->productName == 'davkit'))
|
||||
{
|
||||
$parameters['EXDATE']['VALUE'] = $value_type;
|
||||
foreach ($event['recur_exception'] as $exdate)
|
||||
{
|
||||
$vevent->setAttribute('EXDATE', $exdate, $parameters['EXDATE']);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$attributes['EXDATE'] = '';
|
||||
$values['EXDATE'] = $event['recur_exception'];
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user