forked from extern/egroupware
Calendar: Fix could not delete alarms in unsaved copy of an event
This commit is contained in:
parent
754261ce56
commit
35d8411585
@ -706,10 +706,14 @@ class calendar_uiforms extends calendar_ui
|
|||||||
// Copy alarms
|
// Copy alarms
|
||||||
if (is_array($event['alarm']))
|
if (is_array($event['alarm']))
|
||||||
{
|
{
|
||||||
foreach($event['alarm'] as $n => &$alarm)
|
$alarm_index = 0;
|
||||||
|
$alarms = $event['alarm'];
|
||||||
|
$event['alarm'] = Array();
|
||||||
|
foreach($alarms as $n => $alarm)
|
||||||
{
|
{
|
||||||
unset($alarm['id']);
|
|
||||||
unset($alarm['cal_id']);
|
unset($alarm['cal_id']);
|
||||||
|
$alarm['id'] = $alarm_index++;
|
||||||
|
$event['alarm'][] = $alarm;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user