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

@ -2534,7 +2534,12 @@ class calendar_ical extends calendar_boupdate
// Remove videoconference link appended to description in calendar_groupdav->iCal() // Remove videoconference link appended to description in calendar_groupdav->iCal()
if (!empty($event['description']) && class_exists('EGroupware\Status\Videoconference\Call')) 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']); $event['description'] = preg_replace($regex, '', $event['description']);
} }