summaryrefslogtreecommitdiff
path: root/plugins/libkolab
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/libkolab')
-rw-r--r--plugins/libkolab/lib/kolab_date_recurrence.php6
-rw-r--r--plugins/libkolab/lib/kolab_format_event.php3
2 files changed, 7 insertions, 2 deletions
diff --git a/plugins/libkolab/lib/kolab_date_recurrence.php b/plugins/libkolab/lib/kolab_date_recurrence.php
index 06dd331..b2511f2 100644
--- a/plugins/libkolab/lib/kolab_date_recurrence.php
+++ b/plugins/libkolab/lib/kolab_date_recurrence.php
@@ -87,9 +87,13 @@ class kolab_date_recurrence
$next_end->add($this->duration);
$next = $this->object->to_array();
- $next['recurrence_id'] = $next_start->format('Y-m-d');
$next['start'] = $next_start;
$next['end'] = $next_end;
+
+ $recurrence_id_format = $next['allday'] ? 'Ymd' : 'Ymd\THis';
+ $next['recurrence_date'] = clone $next_start;
+ $next['_instance'] = $next_start->format($recurrence_id_format);
+
unset($next['_formatobj']);
return $next;
diff --git a/plugins/libkolab/lib/kolab_format_event.php b/plugins/libkolab/lib/kolab_format_event.php
index 075c517..bf17149 100644
--- a/plugins/libkolab/lib/kolab_format_event.php
+++ b/plugins/libkolab/lib/kolab_format_event.php
@@ -237,6 +237,7 @@ class kolab_format_event extends kolab_format_xcal
private function compact_exception($exception, $master)
{
$forbidden = array('recurrence','organizer','_attachments');
+ $whitelist = array('start','end');
foreach ($forbidden as $prop) {
if (array_key_exists($prop, $exception)) {
@@ -245,7 +246,7 @@ class kolab_format_event extends kolab_format_xcal
}
foreach ($master as $prop => $value) {
- if (isset($exception[$prop]) && gettype($exception[$prop]) == gettype($value) && $exception[$prop] == $value) {
+ if (isset($exception[$prop]) && gettype($exception[$prop]) == gettype($value) && $exception[$prop] == $value && !in_array($prop, $whitelist)) {
unset($exception[$prop]);
}
}