summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2015-03-02 11:32:40 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2015-03-03 14:57:49 (GMT)
commit03dd4b60b3ed9581aba811589d795bd7fd58dc7d (patch)
tree5621c443ca2d1d9a875709a2fb8027b2fde60328 /plugins
parent724ecc44bfac3874ccccda5178f73313db7abae9 (diff)
downloadroundcubemail-plugins-kolab-03dd4b60b3ed9581aba811589d795bd7fd58dc7d.tar.gz
Exclude cancelled events from count query on invitations calendar
Diffstat (limited to 'plugins')
-rw-r--r--plugins/calendar/drivers/kolab/kolab_invitation_calendar.php7
-rw-r--r--plugins/libkolab/lib/kolab_format_xcal.php4
2 files changed, 10 insertions, 1 deletions
diff --git a/plugins/calendar/drivers/kolab/kolab_invitation_calendar.php b/plugins/calendar/drivers/kolab/kolab_invitation_calendar.php
index 0ffdee5..d63a77d 100644
--- a/plugins/calendar/drivers/kolab/kolab_invitation_calendar.php
+++ b/plugins/calendar/drivers/kolab/kolab_invitation_calendar.php
@@ -284,6 +284,11 @@ class kolab_invitation_calendar
}
}
+ $filter = array(
+ array('tags','!=','x-status:cancelled'),
+ array($subquery, 'OR')
+ );
+
// aggregate counts from all calendar folders
$count = 0;
foreach (kolab_storage::list_folders('', '*', 'event', null) as $foldername) {
@@ -291,7 +296,7 @@ class kolab_invitation_calendar
if ($cal->get_namespace() == 'other')
continue;
- $count += $cal->count_events($start, $end, array(array($subquery, 'OR')));
+ $count += $cal->count_events($start, $end, $filter);
}
return $count;
diff --git a/plugins/libkolab/lib/kolab_format_xcal.php b/plugins/libkolab/lib/kolab_format_xcal.php
index 605d557..8c63b26 100644
--- a/plugins/libkolab/lib/kolab_format_xcal.php
+++ b/plugins/libkolab/lib/kolab_format_xcal.php
@@ -635,6 +635,10 @@ abstract class kolab_format_xcal extends kolab_format
}
}
+ if (!empty($object['status'])) {
+ $tags[] = 'x-status:' . strtolower($object['status']);
+ }
+
return array_unique($tags);
}