mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 00:54:50 +01:00
Fix series exception delete issue
This commit is contained in:
parent
df58928ac6
commit
54f6b31a37
@ -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']);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user