Calendar: Stop EGroupware\Status\Videoconference\Call::getMeetingRegex() from breaking the import

Jitsi backend was crashing with no error
This commit is contained in:
nathan 2023-12-15 15:38:15 -07:00
parent 56774cfeee
commit 70c8649a62

View File

@ -2533,8 +2533,13 @@ 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'))
{
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']);
}