plugins/calendar
Thomas Brüderli
bruederli at kolabsys.com
Tue Mar 31 19:13:10 CEST 2015
plugins/calendar/calendar.php | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
New commits:
commit 0d2f804e66e4bda71d483bdfaaa1f3729818c982
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date: Tue Mar 31 19:13:03 2015 +0200
Do not force RSVP on updates to the master event that was truncated by from 'future' save mode (#4950)
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();
More information about the commits
mailing list