From bd6af0b94ba9a524043d51fb81562921ca2cf529 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 9 Dec 2014 22:35:36 +0000 Subject: [PATCH] Allow setting alarms on recurring events beginning in the past --- calendar/inc/class.calendar_uiforms.inc.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/calendar/inc/class.calendar_uiforms.inc.php b/calendar/inc/class.calendar_uiforms.inc.php index 67b7a27036..34e09c7ad0 100644 --- a/calendar/inc/class.calendar_uiforms.inc.php +++ b/calendar/inc/class.calendar_uiforms.inc.php @@ -938,14 +938,13 @@ class calendar_uiforms extends calendar_ui break; case 'add_alarm': - $time = ($content['actual_date'] ? $content['actual_date'] : $content['start']); + $time = $content['start']; $offset = $time - $content['new_alarm']['date']; - if ($event['recur_type'] != MCAL_RECUR_NONE && ($next_occurrence = $this->bo->read($event['id'], $this->bo->now_su + $offset, true)) && $time < $next_occurrence['start']) { - $time = $next_occurrence['start']; + $content['new_alarm']['date'] = $next_occurrence['start'] - $offset; } if ($this->bo->check_perms(EGW_ACL_EDIT,!$content['new_alarm']['owner'] ? $event : 0,$content['new_alarm']['owner'])) {