2 commits - plugins/libcalendaring
Thomas Brüderli
bruederli at kolabsys.com
Wed Mar 19 11:11:08 CET 2014
plugins/libcalendaring/libvcalendar.php | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
New commits:
commit 532662802b7664a0e1981464f7446b719bda6d4e
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date: Wed Mar 19 11:10:33 2014 +0100
Suppress property parameters with empty values
diff --git a/plugins/libcalendaring/libvcalendar.php b/plugins/libcalendaring/libvcalendar.php
index 4766de6..db3e651 100644
--- a/plugins/libcalendaring/libvcalendar.php
+++ b/plugins/libcalendaring/libvcalendar.php
@@ -967,7 +967,7 @@ class libvcalendar implements Iterator
}
else if (!empty($attendee['email'])) {
$attendee['rsvp'] = $attendee['rsvp'] ? 'TRUE' : null;
- $ve->add('ATTENDEE', 'mailto:' . $attendee['email'], self::map_keys($attendee, $this->attendee_keymap));
+ $ve->add('ATTENDEE', 'mailto:' . $attendee['email'], array_filter(self::map_keys($attendee, $this->attendee_keymap)));
}
}
@@ -1001,7 +1001,7 @@ class libvcalendar implements Iterator
// embed attachments for iCal
$ve->add('ATTACH',
base64_encode($data),
- array('VALUE' => 'BINARY', 'ENCODING' => 'BASE64', 'FMTTYPE' => $attach['mimetype'], 'X-LABEL' => $attach['name']));
+ array_filter(array('VALUE' => 'BINARY', 'ENCODING' => 'BASE64', 'FMTTYPE' => $attach['mimetype'], 'X-LABEL' => $attach['name'])));
unset($data); // attempt to free memory
}
// list attachments as absolute URIs
commit 89005391eb4faa74ed509a2e7018956f575f5cbd
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date: Tue Mar 18 18:05:48 2014 +0100
Add support for COMMENT property used in iTip messages
diff --git a/plugins/libcalendaring/libvcalendar.php b/plugins/libcalendaring/libvcalendar.php
index 0bfa521..4766de6 100644
--- a/plugins/libcalendaring/libvcalendar.php
+++ b/plugins/libcalendaring/libvcalendar.php
@@ -518,6 +518,10 @@ class libvcalendar implements Iterator
}
break;
+ case 'COMMENT':
+ $event['comment'] = $prop->value;
+ break;
+
default:
if (substr($prop->name, 0, 2) == 'X-')
$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'));
}
+ if ($event['comment'])
+ $ve->add('COMMENT', $event['comment']);
+
// export attachments
if (!empty($event['attachments'])) {
foreach ((array)$event['attachments'] as $attach) {
More information about the commits
mailing list