T1524: Fix delegation context on itip-remove command, and on cases where's more than one delegator
Fixes bug where delegatee does not receive event cancelation message after deleting meeting in delegators calendar
This commit is contained in:
parent
cbf4fa90d6
commit
a84b2d73b4
3 changed files with 10 additions and 3 deletions
|
@ -2611,9 +2611,10 @@ class calendar extends rcube_plugin
|
|||
$uid = rcube_utils::get_input_value('uid', rcube_utils::INPUT_POST);
|
||||
$instance = rcube_utils::get_input_value('_instance', rcube_utils::INPUT_POST);
|
||||
$savemode = rcube_utils::get_input_value('_savemode', rcube_utils::INPUT_POST);
|
||||
$listmode = calendar_driver::FILTER_WRITEABLE | calendar_driver::FILTER_PERSONAL;
|
||||
|
||||
// search for event if only UID is given
|
||||
if ($event = $this->driver->get_event(array('uid' => $uid, '_instance' => $instance), calendar_driver::FILTER_WRITEABLE)) {
|
||||
if ($event = $this->driver->get_event(array('uid' => $uid, '_instance' => $instance), $listmode)) {
|
||||
$event['_savemode'] = $savemode;
|
||||
$success = $this->driver->remove_event($event, true);
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ window.rcmail && rcmail.addEventListener('init', function(evt) {
|
|||
rcmail.addEventListener('requestcalendar/mailimportevent', function(o) { rcmail.event_delegator_request(o); });
|
||||
rcmail.addEventListener('requestcalendar/mailimportitip', function(o) { rcmail.event_delegator_request(o); });
|
||||
rcmail.addEventListener('requestcalendar/itip-status', function(o) { rcmail.event_delegator_request(o); });
|
||||
rcmail.addEventListener('requestcalendar/itip-remove', function(o) { rcmail.event_delegator_request(o); });
|
||||
|
||||
if (rcmail.env.delegators && window.rcube_calendar_ui) {
|
||||
rcmail.calendar_identity_init();
|
||||
|
|
|
@ -813,12 +813,17 @@ class kolab_delegation_engine
|
|||
continue;
|
||||
}
|
||||
|
||||
$found = false;
|
||||
foreach ($other_ns as $ns) {
|
||||
$folder = $ns[0] . $context . $delim;
|
||||
if (strpos($cal->name, $folder) !== 0) {
|
||||
continue;
|
||||
if (strpos($cal->name, $folder) === 0) {
|
||||
$found = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$found) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue