summaryrefslogtreecommitdiff
path: root/plugins/calendar
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/calendar
parent724ecc44bfac3874ccccda5178f73313db7abae9 (diff)
downloadroundcubemail-plugins-kolab-03dd4b60b3ed9581aba811589d795bd7fd58dc7d.tar.gz
Exclude cancelled events from count query on invitations calendar
Diffstat (limited to 'plugins/calendar')
-rw-r--r--plugins/calendar/drivers/kolab/kolab_invitation_calendar.php7
1 files changed, 6 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;