* CalDAV: fix not parsed recurrence exceptions

caused by newer Horde Icalendar class always importing them as date
This commit is contained in:
Ralf Becker 2017-09-21 15:19:07 +02:00
parent c4f048bbae
commit 3cc0012c77

View File

@ -2781,11 +2781,8 @@ class calendar_ical extends calendar_boupdate
break; break;
} }
break; break;
case 'EXDATE': case 'EXDATE': // current Horde_Icalendar returns dates, no timestamps
if (!$attributes['value']) break; if ($attributes['values'])
if ((isset($attributes['params']['VALUE'])
&& $attributes['params']['VALUE'] == 'DATE') ||
(!isset($attributes['params']['VALUE']) && $isDate))
{ {
$days = array(); $days = array();
$hour = date('H', $vcardData['start']); $hour = date('H', $vcardData['start']);
@ -2803,10 +2800,6 @@ class calendar_ical extends calendar_boupdate
} }
$vcardData['recur_exception'] = array_merge($vcardData['recur_exception'], $days); $vcardData['recur_exception'] = array_merge($vcardData['recur_exception'], $days);
} }
else
{
$vcardData['recur_exception'] = array_merge($vcardData['recur_exception'], $attributes['values']);
}
break; break;
case 'SUMMARY': case 'SUMMARY':
$vcardData['title'] = str_replace("\r\n", "\n", $attributes['value']); $vcardData['title'] = str_replace("\r\n", "\n", $attributes['value']);