summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2015-03-31 17:13:03 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2015-03-31 17:13:03 (GMT)
commit0d2f804e66e4bda71d483bdfaaa1f3729818c982 (patch)
treea6c2a3a930be1b63c1d7daa6995766ebe69efc25
parentc43040e4e1af09dd05db8c6e15668d034a8bc1ab (diff)
downloadroundcubemail-plugins-kolab-0d2f804e66e4bda71d483bdfaaa1f3729818c982.tar.gz
Do not force RSVP on updates to the master event that was truncated by from 'future' save mode (#4950)
-rw-r--r--plugins/calendar/calendar.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/calendar/calendar.php b/plugins/calendar/calendar.php
index 17a3db5..0d97610 100644
--- a/plugins/calendar/calendar.php
+++ b/plugins/calendar/calendar.php
@@ -1178,7 +1178,7 @@ class calendar extends rcube_plugin
$master = $this->driver->get_event(array('id' => $old['recurrence_id'], 'calendar' => $old['calendar']), 0, true);
unset($master['_instance'], $master['recurrence_date']);
- $sent = $this->notify_attendees($master, null, $action, $event['_comment']);
+ $sent = $this->notify_attendees($master, null, $action, $event['_comment'], false);
if ($sent < 0)
$this->rc->output->show_message('calendar.errornotifying', 'error');
@@ -2005,13 +2005,16 @@ class calendar extends rcube_plugin
/**
* Send out an invitation/notification to all event attendees
*/
- private function notify_attendees($event, $old, $action = 'edit', $comment = null)
+ private function notify_attendees($event, $old, $action = 'edit', $comment = null, $rsvp = null)
{
if ($action == 'remove' || ($event['status'] == 'CANCELLED' && $old['status'] != $event['status'])) {
$event['cancelled'] = true;
$is_cancelled = true;
}
+ if ($rsvp === null)
+ $rsvp = !$old || $event['sequence'] > $old['sequence'];
+
$itip = $this->load_itip();
$emails = $this->get_user_emails();
$itip_notify = (int)$this->rc->config->get('calendar_itip_send_option', $this->defaults['calendar_itip_send_option']);
@@ -2024,7 +2027,7 @@ class calendar extends rcube_plugin
// compose multipart message using PEAR:Mail_Mime
$method = $action == 'remove' ? 'CANCEL' : 'REQUEST';
- $message = $itip->compose_itip_message($event, $method, !$old || $event['sequence'] > $old['sequence']);
+ $message = $itip->compose_itip_message($event, $method, $rsvp);
// list existing attendees from $old event
$old_attendees = array();