From c0444f5be742d120bccad86414c726c8f9ff4b06 Mon Sep 17 00:00:00 2001 From: Michael J Rubinsky Date: Thu, 21 Nov 2013 16:11:59 -0500 Subject: [PATCH] Honor the RECURRENCE-ID RANGE when deleting an event. --- imp/lib/Ajax/Imple/ItipRequest.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/imp/lib/Ajax/Imple/ItipRequest.php b/imp/lib/Ajax/Imple/ItipRequest.php index 1f10b98fb82..6ce0bbc4c3a 100644 --- a/imp/lib/Ajax/Imple/ItipRequest.php +++ b/imp/lib/Ajax/Imple/ItipRequest.php @@ -89,14 +89,20 @@ protected function _handle(Horde_Variables $vars) if ($registry->hasMethod('calendar/delete')) { $guid = $components[$key]->getAttribute('UID'); $recurrenceId = null; - try { // This is a cancellation of a recurring event instance. $recurrenceId = $components[$key]->getAttribute('RECURRENCE-ID'); + $atts = $components[$key]->getAttribute('RECURRENCE-ID', true); + $range = null; + foreach ($atts as $att) { + if (array_key_exists('RANGE', $att)) { + $range = $att['RANGE']; + } + } } catch (Horde_Icalendar_Exception $e) {} try { - $registry->call('calendar/delete', array($guid, $recurrenceId)); + $registry->call('calendar/delete', array($guid, $recurrenceId, $range)); $notification->push(_("Event successfully deleted."), 'horde.success'); $result = true; } catch (Horde_Exception $e) {