From 70c8649a6210b349e41e956454ccfeec8d5cded2 Mon Sep 17 00:00:00 2001 From: nathan Date: Fri, 15 Dec 2023 15:38:15 -0700 Subject: [PATCH] Calendar: Stop EGroupware\Status\Videoconference\Call::getMeetingRegex() from breaking the import Jitsi backend was crashing with no error --- calendar/inc/class.calendar_ical.inc.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/calendar/inc/class.calendar_ical.inc.php b/calendar/inc/class.calendar_ical.inc.php index a712209a4a..f62dcb82c2 100644 --- a/calendar/inc/class.calendar_ical.inc.php +++ b/calendar/inc/class.calendar_ical.inc.php @@ -2534,7 +2534,12 @@ class calendar_ical extends calendar_boupdate // Remove videoconference link appended to description in calendar_groupdav->iCal() if (!empty($event['description']) && class_exists('EGroupware\Status\Videoconference\Call')) { - $regex = "/^(\r?\n)?(Videoconference|" . lang('Videoconference') . "):\r?\n" . str_replace('/','\/',EGroupware\Status\Videoconference\Call::getMeetingRegex()) ."(\r?\n)*/im"; + static $regex = ""; + if(!$regex) + { + $regex = "/^(\r?\n)?(Videoconference|" . lang('Videoconference') . "):\r?\n" . str_replace('/', '\/', EGroupware\Status\Videoconference\Call::getMeetingRegex()) . "(\r?\n)*/im"; + } + $event['description'] = preg_replace($regex, '', $event['description']); }