* EMail/Calendar: for meeting requests to recuring events check recurrance enddate, not event-date, to deny importing it with "event is in the past"

This commit is contained in:
Ralf Becker 2012-03-12 08:52:40 +00:00
parent 3a4274af02
commit 1575434535

View File

@ -1689,8 +1689,9 @@ function replace_eTemplate_onsubmit()
$readonlys['button[accept]'] = $readonlys['button[tentativ]'] = $readonlys['button[reject]'] = true;
}
}
// ignore events in the past
if ($this->bo->date2ts($event['start']) < $this->bo->now_su)
// ignore events in the past (for recurring events check enddate!)
if ($this->bo->date2ts($event['start']) < $this->bo->now_su &&
(!$event['recur_type'] || $event['recur_enddate'] && $event['recur_enddate'] < $this->bo->now_su))
{
$msg = lang('Requested meeting is in the past!');
$readonlys['button[accept]'] = $readonlys['button[tentativ]'] = $readonlys['button[reject]'] = true;