mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +01:00
run notifications and tracking after response send to client
This commit is contained in:
parent
406cc7ec8b
commit
b02aa04c8c
@ -1496,15 +1496,18 @@ class calendar_boupdate extends calendar_bo
|
||||
|
||||
// Update history
|
||||
$tracking = new calendar_tracking($this);
|
||||
if (empty($event['id']) && !empty($cal_id)) $event['id']=$cal_id;
|
||||
// we run all dates through date2ts, to adjust to server-time and the possible date-formats
|
||||
// This is done here to avoid damaging the actual event when saving, but the old event is in server-time
|
||||
foreach($timestamps as $ts)
|
||||
Api\Egw::on_shutdown(function() use ($tracking, $event, $cal_id, $timestamps, $save_event, $old_event)
|
||||
{
|
||||
// we convert here from user-time to timestamps in server-time!
|
||||
if (isset($save_event[$ts])) $save_event[$ts] = $save_event[$ts] ? $this->date2ts($save_event[$ts],true) : 0;
|
||||
}
|
||||
$tracking->track($save_event, $old_event);
|
||||
if (empty($event['id']) && !empty($cal_id)) $event['id'] = $cal_id;
|
||||
// we run all dates through date2ts, to adjust to server-time and the possible date-formats
|
||||
// This is done here to avoid damaging the actual event when saving, but the old event is in server-time
|
||||
foreach ($timestamps as $ts)
|
||||
{
|
||||
// we convert here from user-time to timestamps in server-time!
|
||||
if (isset($save_event[$ts])) $save_event[$ts] = $save_event[$ts] ? calendar_bo::date2ts($save_event[$ts], true) : 0;
|
||||
}
|
||||
$tracking->track($save_event, $old_event);
|
||||
});
|
||||
|
||||
return $cal_id;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user