From 869bde56a853ad1a6b6782ececdc3064ea7faeea Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Tue, 30 Aug 2022 11:14:22 +0200 Subject: [PATCH] Fix handling alarms related to the end of the event --- plugins/libcalendaring/libcalendaring.php | 2 +- plugins/libkolab/lib/kolab_format_xcal.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/libcalendaring/libcalendaring.php b/plugins/libcalendaring/libcalendaring.php index 426f6f48..29f26171 100644 --- a/plugins/libcalendaring/libcalendaring.php +++ b/plugins/libcalendaring/libcalendaring.php @@ -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); diff --git a/plugins/libkolab/lib/kolab_format_xcal.php b/plugins/libkolab/lib/kolab_format_xcal.php index 96e0a740..9168e63f 100644 --- a/plugins/libkolab/lib/kolab_format_xcal.php +++ b/plugins/libkolab/lib/kolab_format_xcal.php @@ -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'; } }