plugins/calendar
Thomas Brüderli
bruederli at kolabsys.com
Thu Feb 21 17:42:22 CET 2013
plugins/calendar/lib/calendar_ical.php | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
New commits:
commit cf3426a4ae64962a1eeab86b54a7632e9c2993c8
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date: Thu Feb 21 17:41:41 2013 +0100
Support import/export of custom properties
diff --git a/plugins/calendar/lib/calendar_ical.php b/plugins/calendar/lib/calendar_ical.php
index 0fea74e..6d7474e 100644
--- a/plugins/calendar/lib/calendar_ical.php
+++ b/plugins/calendar/lib/calendar_ical.php
@@ -9,7 +9,7 @@
* @author Bogomil "Bogo" Shopov <shopov at kolabsys.com>
*
* Copyright (C) 2010, Lazlo Westerhof <hello at lazlo.me>
- * Copyright (C) 2011, Kolab Systems AG <contact at kolabsys.com>
+ * Copyright (C) 2013, Kolab Systems AG <contact at kolabsys.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -258,6 +258,10 @@ class calendar_ical
else if (in_array($attr['value'], array('FREE', 'BUSY', 'TENTATIVE')))
$event['free_busy'] = strtolower($attr['value']);
break;
+
+ default:
+ if (substr($attr['name'], 0, 2) == 'X-')
+ $event['x-custom'][] = array($attr['name'], $attr['value']);
}
}
@@ -416,6 +420,9 @@ class calendar_ical
else if ($event['free_busy'] == 'tentative')
$vevent .= "STATUS:TENTATIVE" . self::EOL;
+ foreach ((array)$event['x-custom'] as $prop)
+ $vevent .= $prop[0] . ':' . $this->escpape($prop[1]) . self::EOL;
+
// TODO: export attachments
$vevent .= "END:VEVENT" . self::EOL;
More information about the commits
mailing list