diff --git a/calendar/inc/class.calendar_uiforms.inc.php b/calendar/inc/class.calendar_uiforms.inc.php index 4fbdb11956..727f8d500f 100644 --- a/calendar/inc/class.calendar_uiforms.inc.php +++ b/calendar/inc/class.calendar_uiforms.inc.php @@ -189,6 +189,17 @@ class calendar_uiforms extends calendar_ui unset($content['recur_exception']['delete_exception']); if (($key = array_search($date,$content['recur_exception'])) !== false) { + // propagate the exception to a single event + $recur_exceptions = $this->bo->so->get_related($content['uid']); + foreach ($recur_exceptions as $id) + { + if (!($exception = $this->bo->read($id)) || + $exception['recurrence'] != $content['recur_exception'][$key]) continue; + $exception['uid'] = common::generate_uid('calendar', $id); + $exception['reference'] = $exception['recurrence'] = 0; + $this->bo->update($exception, true); + break; + } unset($content['recur_exception'][$key]); $content['recur_exception'] = array_values($content['recur_exception']); }