summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2014-10-05 14:38:20 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2014-10-05 14:38:20 (GMT)
commitb72aee51e56792688ad6193e64ff5dd55ab4e5d1 (patch)
tree67c29c17b5d370fa8b12a79f467060f3c8252047
parentd5bfadb07944d2b35dc7647b938b764685711e02 (diff)
downloadroundcubemail-plugins-kolab-b72aee51e56792688ad6193e64ff5dd55ab4e5d1.tar.gz
Avoid duplicate invitation boxes (#3585)
-rw-r--r--plugins/calendar/calendar.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/calendar/calendar.php b/plugins/calendar/calendar.php
index b6b63d1..95240ab 100644
--- a/plugins/calendar/calendar.php
+++ b/plugins/calendar/calendar.php
@@ -1928,6 +1928,7 @@ class calendar extends rcube_plugin
}
$html = '';
+ $seen = array();
foreach ($this->ics_parts as $mime_id) {
$part = $this->message->mime_parts[$mime_id];
$charset = $part->ctype_parameters['charset'] ? $part->ctype_parameters['charset'] : RCMAIL_CHARSET;
@@ -1944,6 +1945,10 @@ class calendar extends rcube_plugin
if ($event['_type'] != 'event') // skip non-event objects (#2928)
continue;
+ // avoid duplicates with the same UID (e.g. from Google invitations, #3585)
+ if ($seen[$event['uid']]++)
+ continue;
+
// define buttons according to method
if ($this->ical->method == 'REPLY') {
$title = $this->gettext('itipreply');