diff --git a/plugins/calendar/lib/calendar_ical.php b/plugins/calendar/lib/calendar_ical.php index 0fea74e0..6d7474ec 100644 --- a/plugins/calendar/lib/calendar_ical.php +++ b/plugins/calendar/lib/calendar_ical.php @@ -9,7 +9,7 @@ * @author Bogomil "Bogo" Shopov * * Copyright (C) 2010, Lazlo Westerhof - * Copyright (C) 2011, Kolab Systems AG + * Copyright (C) 2013, Kolab Systems AG * * 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;