summaryrefslogtreecommitdiff
path: root/lib/Kolab/Utils/DAVBackend.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Kolab/Utils/DAVBackend.php')
-rw-r--r--lib/Kolab/Utils/DAVBackend.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Kolab/Utils/DAVBackend.php b/lib/Kolab/Utils/DAVBackend.php
index 9cc434b..41c1997 100644
--- a/lib/Kolab/Utils/DAVBackend.php
+++ b/lib/Kolab/Utils/DAVBackend.php
@@ -37,6 +37,8 @@ class DAVBackend
const IMAP_UID_KEY_PRIVATE = '/private/vendor/kolab/uniqueid';
const IMAP_UID_KEY_CYRUS = '/shared/vendor/cmu/cyrus-imapd/uniqueid';
+ public static $caldav_type_component_map = array('event' => 'VEVENT', 'task' => 'VTODO');
+
/**
* Getter for a kolab_storage_folder with the given UID
*
@@ -230,6 +232,14 @@ class DAVBackend
$props['color'] = substr(trim($val, '#'), 0, 6);
break;
+ case '{urn:ietf:params:xml:ns:caldav}supported-calendar-component-set':
+ $type_map = array_flip(self::$caldav_type_component_map);
+ $comp_types = $val->getValue();
+ $comp_type = $comp_types[0];
+ if (!empty($type_map[$comp_type]))
+ $props['type'] = $type = $type_map[$comp_type];
+ break;
+
case '{urn:ietf:params:xml:ns:caldav}calendar-description':
default:
// unsupported property