Fix X-MICROSOFT-CDO-ALLDAYEVENT calendar issue for CalDAV clients

This commit is contained in:
Jörg Lehrke 2013-11-23 08:13:01 +00:00
parent e322875350
commit 2925d10165

View File

@ -1943,6 +1943,7 @@ class calendar_ical extends calendar_boupdate
'recur_exception' => 'recur_exception', 'recur_exception' => 'recur_exception',
'title' => 'title', 'title' => 'title',
'alarm' => 'alarm', 'alarm' => 'alarm',
'whole_day' => 'whole_day',
); );
$defaultFields['basic'] = $defaultFields['minimal'] + array( $defaultFields['basic'] = $defaultFields['minimal'] + array(
@ -2126,6 +2127,7 @@ class calendar_ical extends calendar_boupdate
{ {
default: default:
$this->supportedFields = $defaultFields['full']; $this->supportedFields = $defaultFields['full'];
unset($this->supportedFields['whole_day']);
} }
break; break;
@ -2412,7 +2414,10 @@ class calendar_ical extends calendar_boupdate
switch ($attributes['name']) switch ($attributes['name'])
{ {
case 'X-MICROSOFT-CDO-ALLDAYEVENT': case 'X-MICROSOFT-CDO-ALLDAYEVENT':
$event['whole_day'] = (isset($attributes['value'])?strtoupper($attributes['value'])=='TRUE':true); if (isset($supportedFields['whole_day']))
{
$event['whole_day'] = (isset($attributes['value'])?strtoupper($attributes['value'])=='TRUE':true);
}
break; break;
case 'AALARM': case 'AALARM':
case 'DALARM': case 'DALARM':
@ -2929,6 +2934,7 @@ class calendar_ical extends calendar_boupdate
case 'recur_data': case 'recur_data':
case 'recur_exception': case 'recur_exception':
case 'recur_count': case 'recur_count':
case 'whole_day':
// not handled here // not handled here
break; break;