summaryrefslogtreecommitdiff
path: root/plugins/libkolab
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2015-02-20 11:32:20 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2015-02-20 11:32:20 (GMT)
commitb41f2a05cb0d4fd67f5b65d00132c271d19a68b0 (patch)
tree16ab4c72c8e6a0e2f2f1989aaf99903f34e0eac1 /plugins/libkolab
parent928e4131c463d8176256dda5c3221f4d0567ba09 (diff)
downloadroundcubemail-plugins-kolab-b41f2a05cb0d4fd67f5b65d00132c271d19a68b0.tar.gz
Fix rescheduling and notification on change of recurrence rules
Diffstat (limited to 'plugins/libkolab')
-rw-r--r--plugins/libkolab/lib/kolab_format_xcal.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/plugins/libkolab/lib/kolab_format_xcal.php b/plugins/libkolab/lib/kolab_format_xcal.php
index 4d3a758..3a9ad1f 100644
--- a/plugins/libkolab/lib/kolab_format_xcal.php
+++ b/plugins/libkolab/lib/kolab_format_xcal.php
@@ -662,10 +662,17 @@ abstract class kolab_format_xcal extends kolab_format
$b = $b->format('Y-m-d');
}
if ($prop == 'recurrence' && is_array($a) && is_array($b)) {
- unset($a['EXCEPTIONS']);
- unset($b['EXCEPTIONS']);
+ unset($a['EXCEPTIONS'], $b['EXCEPTIONS']);
$a = array_filter($a);
$b = array_filter($b);
+
+ // advanced rrule comparison: no rescheduling if series was shortened
+ if ($a['COUNT'] && $b['COUNT'] && $b['COUNT'] < $a['COUNT']) {
+ unset($a['COUNT'], $b['COUNT']);
+ }
+ else if ($a['UNTIL'] && $b['UNTIL'] && $b['UNTIL'] < $a['UNTIL']) {
+ unset($a['UNTIL'], $b['UNTIL']);
+ }
}
if ($a != $b) {
$reschedule = true;