mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:04 +01:00
patch #1455: alarms for recuring events originating in past
This commit is contained in:
parent
bc38a6bfbe
commit
bf8bae23e7
@ -624,7 +624,20 @@ ORDER BY cal_user_type, cal_usre_id
|
|||||||
{
|
{
|
||||||
if (is_numeric($id)) unset($alarm['id']); // unset the temporary id, to add the alarm
|
if (is_numeric($id)) unset($alarm['id']); // unset the temporary id, to add the alarm
|
||||||
|
|
||||||
$alarm['time'] = $event['cal_start'] - $alarm['offset']; // recalculate the offset, as the start-time might have changed
|
if(!isset($alarm['offset']))
|
||||||
|
{
|
||||||
|
$alarm['offset'] = $event['cal_start'] - $alarm['time'];
|
||||||
|
}
|
||||||
|
elseif (!isset($alarm['time']))
|
||||||
|
{
|
||||||
|
$alarm['time'] = $event['cal_start'] - $alarm['offset'];
|
||||||
|
}
|
||||||
|
|
||||||
|
//pgoerzen: don't add an alarm if it is before the current date.
|
||||||
|
if ($event['recur_type'] && ($tmp_event = $this->read($eventID, time() + $alarm['offset'])))
|
||||||
|
{
|
||||||
|
$alarm['time'] = $tmp_event['cal_start'] - $alarm['offset'];
|
||||||
|
}
|
||||||
|
|
||||||
$this->save_alarm($cal_id,$alarm);
|
$this->save_alarm($cal_id,$alarm);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user