mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 23:00:56 +01:00
* Calendar: fixed recuring event lost start-date, if single recurrence got deleted, also installed save-guard in case other code triggers that too
caused by storing an event with unset start- or end-date, to not write it
This commit is contained in:
parent
7410c738c8
commit
49f1d43ad1
@ -1481,8 +1481,6 @@ class calendar_boupdate extends calendar_bo
|
|||||||
$recur_date = $this->date2ts($event['start']);
|
$recur_date = $this->date2ts($event['start']);
|
||||||
$event = $this->read($cal_id);
|
$event = $this->read($cal_id);
|
||||||
$event['recur_exception'][] = $recur_date;
|
$event['recur_exception'][] = $recur_date;
|
||||||
unset($event['start']);
|
|
||||||
unset($event['end']);
|
|
||||||
$this->save($event); // updates the content-history
|
$this->save($event); // updates the content-history
|
||||||
}
|
}
|
||||||
if ($event['reference'])
|
if ($event['reference'])
|
||||||
|
@ -995,11 +995,13 @@ ORDER BY cal_user_type, cal_usre_id
|
|||||||
unset($event[$col]);
|
unset($event[$col]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// set range_start/_end
|
// set range_start/_end, but only if we have cal_start/_end, as otherwise we destroy present values!
|
||||||
$event['range_start'] = $event['cal_start'];
|
if (isset($event['cal_start'])) $event['range_start'] = $event['cal_start'];
|
||||||
$event['range_end'] = $event['recur_type'] == MCAL_RECUR_NONE ? $event['cal_end'] :
|
if (isset($event['cal_end']))
|
||||||
($event['recur_enddate'] ? $event['recur_enddate'] : null);
|
{
|
||||||
|
$event['range_end'] = $event['recur_type'] == MCAL_RECUR_NONE ? $event['cal_end'] :
|
||||||
|
($event['recur_enddate'] ? $event['recur_enddate'] : null);
|
||||||
|
}
|
||||||
// ensure that we find mathing entries later on
|
// ensure that we find mathing entries later on
|
||||||
if (!is_array($event['cal_category']))
|
if (!is_array($event['cal_category']))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user