Add support for COMMENT property used in iTip messages

This commit is contained in:
Thomas Bruederli 2014-03-18 18:05:48 +01:00
parent 26824f3d51
commit 89005391eb

View file

@ -518,6 +518,10 @@ class libvcalendar implements Iterator
} }
break; break;
case 'COMMENT':
$event['comment'] = $prop->value;
break;
default: default:
if (substr($prop->name, 0, 2) == 'X-') if (substr($prop->name, 0, 2) == 'X-')
$event['x-custom'][] = array($prop->name, strval($prop->value)); $event['x-custom'][] = array($prop->name, strval($prop->value));
@ -981,6 +985,9 @@ class libvcalendar implements Iterator
$ve->add('RELATED-TO', $event['parent_id'], array('RELTYPE' => 'PARENT')); $ve->add('RELATED-TO', $event['parent_id'], array('RELTYPE' => 'PARENT'));
} }
if ($event['comment'])
$ve->add('COMMENT', $event['comment']);
// export attachments // export attachments
if (!empty($event['attachments'])) { if (!empty($event['attachments'])) {
foreach ((array)$event['attachments'] as $attach) { foreach ((array)$event['attachments'] as $attach) {