summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2013-02-27 16:21:48 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2013-02-27 16:21:48 (GMT)
commitf780011a58d463a2980bf1b5de5d8161c213fdf2 (patch)
treed29613a345edd2e3e9355130cb24cd18c65ecf6c
parent54b6c137fc5d28422a603818b6739359ff651ccd (diff)
downloadiRony-f780011a58d463a2980bf1b5de5d8161c213fdf2.tar.gz
Fix handling of event class (sensitivity)
-rw-r--r--lib/Kolab/CalDAV/CalendarBackend.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Kolab/CalDAV/CalendarBackend.php b/lib/Kolab/CalDAV/CalendarBackend.php
index 1d002df..3dd5016 100644
--- a/lib/Kolab/CalDAV/CalendarBackend.php
+++ b/lib/Kolab/CalDAV/CalendarBackend.php
@@ -621,8 +621,7 @@ class CalendarBackend extends CalDAV\Backend\AbstractBackend
case 'CLASS':
case 'X-CALENDARSERVER-ACCESS':
- $sensitivity_map = array('PUBLIC' => 0, 'PRIVATE' => 1, 'CONFIDENTIAL' => 2);
- $event['sensitivity'] = $sensitivity_map[$prop->value];
+ $event['sensitivity'] = strtolower($prop->value);
break;
case 'X-MICROSOFT-CDO-BUSYSTATUS':
@@ -792,6 +791,9 @@ class CalendarBackend extends CalDAV\Backend\AbstractBackend
else if ($event['free_busy'] == 'tentative')
$ve->add('STATUS', 'TENTATIVE');
+ if (!empty($event['sensitivity']))
+ $ve->add('CLASS', strtoupper($event['sensitivity']));
+
if ($event['alarms']) {
$va = VObject\Component::create('VALARM');
list($trigger, $va->action) = explode(':', $event['alarms']);