mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-29 11:23:54 +01:00
When deleting but keeping events, hold on to links as well so they can be restored if event is restored
This commit is contained in:
parent
d7168805c9
commit
2b13b73b60
@ -352,6 +352,11 @@ class calendar_boupdate extends calendar_bo
|
|||||||
$event = $this->read($cal_id); // we re-read the event, in case only partial information was update and we need the full info for the notifies
|
$event = $this->read($cal_id); // we re-read the event, in case only partial information was update and we need the full info for the notifies
|
||||||
//echo "new $cal_id="; _debug_array($event);
|
//echo "new $cal_id="; _debug_array($event);
|
||||||
|
|
||||||
|
if($old_event['deleted'] && $event['deleted'] == null)
|
||||||
|
{
|
||||||
|
// Restored, bring back links
|
||||||
|
egw_link::restore('calendar', $cal_id);
|
||||||
|
}
|
||||||
if ($this->log_file)
|
if ($this->log_file)
|
||||||
{
|
{
|
||||||
$this->log2file($event2save,$event,$old_event);
|
$this->log2file($event2save,$event,$old_event);
|
||||||
@ -1241,6 +1246,9 @@ class calendar_boupdate extends calendar_bo
|
|||||||
}
|
}
|
||||||
elseif ($config['calendar_delete_history'])
|
elseif ($config['calendar_delete_history'])
|
||||||
{
|
{
|
||||||
|
// mark all links to the event as deleted, but keep them
|
||||||
|
egw_link::unlink(0,'calendar',$cal_id,'','','',true);
|
||||||
|
|
||||||
$event['deleted'] = $this->now;
|
$event['deleted'] = $this->now;
|
||||||
$this->save($event, $ignore_acl);
|
$this->save($event, $ignore_acl);
|
||||||
// Actually delete alarms
|
// Actually delete alarms
|
||||||
|
Loading…
Reference in New Issue
Block a user