Fix drag and drop series exceptions did not remove original

This commit is contained in:
Nathan Gray 2015-11-13 23:30:26 +00:00
parent c0ba0a5bcf
commit 61d4e1535e

View File

@ -2657,14 +2657,13 @@ foreach($recur_event as $_k => $_v) error_log($_k . ': ' . array2string($_v));
// For DnD, create an exception if they gave the date
$this->_create_exception($event,$preserv);
unset($event['id']);
$date = $d->format('ts');
$conflicts = $this->bo->update($event,false,true,false,true,$messages);
if (!is_array($conflicts) && $conflicts)
{
// now we need to add the original start as recur-execption to the series
$recur_event = $this->bo->read($event['reference']);
$recur_event['recur_exception'][] = $this->bo->date2ts($targetDateTime);
$recur_event['recur_exception'][] = $date;
// check if we need to move the alarms, because they are next on that exception
foreach($recur_event['alarm'] as $id => $alarm)
{