From f1b4367181a751b34db262f4a6a98a8b36ae0eb4 Mon Sep 17 00:00:00 2001 From: nathangray Date: Mon, 16 May 2016 15:56:08 -0600 Subject: [PATCH] Fix original event stays when a series exception is created --- calendar/inc/class.calendar_uiforms.inc.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/calendar/inc/class.calendar_uiforms.inc.php b/calendar/inc/class.calendar_uiforms.inc.php index 1298ed940f..1bad3e8524 100644 --- a/calendar/inc/class.calendar_uiforms.inc.php +++ b/calendar/inc/class.calendar_uiforms.inc.php @@ -702,6 +702,13 @@ class calendar_uiforms extends calendar_ui unset($recur_event['alarm']); // unsetting alarms too, as they cant be updated without start! $this->bo->update($recur_event,true); // no conflict check here + if(Api\Json\Response::isJSONResponse()) + { + // Sending null will trigger a removal of the original + // for that date + Api\Json\Response::get()->generic('data', array('uid' => 'calendar::'.$content['reference'].':'.$content['actual_date'], 'data' => null)); + } + unset($recur_event); unset($event['edit_single']); // if we further edit it, it's just a single event unset($preserv['edit_single']); @@ -2625,6 +2632,10 @@ class calendar_uiforms extends calendar_ui unset($recur_event['start']); unset($recur_event['end']); // no update necessary unset($recur_event['alarm']); // unsetting alarms too, as they cant be updated without start! $this->bo->update($recur_event,true); // no conflict check here + + // Sending null will trigger a removal of the original for that date + Api\Json\Response::get()->generic('data', array('uid' => 'calendar::'.$_eventId, 'data' => null)); + unset($recur_event); unset($event['edit_single']); // if we further edit it, it's just a single event unset($preserv['edit_single']);