Fix handling alarms related to the end of the event

This commit is contained in:
Aleksander Machniak 2022-08-30 11:14:22 +02:00
parent c9ecf73fc1
commit 869bde56a8
2 changed files with 2 additions and 2 deletions

View file

@ -614,7 +614,7 @@ class libcalendaring extends rcube_plugin
));
}
else if ($val = self::parse_alarm_value($trigger)) {
$r = strtoupper($related ?: 'start') == 'END' ? 'end' : '';
$r = $related && strtoupper($related) == 'END' ? 'end' : '';
// TODO: for all-day events say 'on date of event at XX' ?
if ($val[0] == 0) {
$text .= ' ' . $rcube->gettext('libcalendaring.triggerattime' . $r);

View file

@ -286,7 +286,7 @@ abstract class kolab_format_xcal extends kolab_format
$valarm['trigger'] = $prefix . 'P' . $value . ($time ? 'T' . $time : '');
if ($alarm->relativeTo() == kolabformat::End) {
$valarm['related'] == 'END';
$valarm['related'] = 'END';
}
}