fix Error: Call to undefined method calendar_bo::find_or_add_categories() when specifying categories

This commit is contained in:
ralf 2023-07-26 16:30:10 +02:00
parent d071757bb9
commit d3b644ebec

View File

@ -380,7 +380,7 @@ class JsCalendar
$cat_ids = []; $cat_ids = [];
if ($categories) if ($categories)
{ {
if (!isset($bo)) $bo = new \calendar_bo(); if (!isset($bo)) $bo = new \calendar_boupdate();
$cat_ids = $bo->find_or_add_categories(array_keys($categories)); $cat_ids = $bo->find_or_add_categories(array_keys($categories));
} }
return $cat_ids ? implode(',', $cat_ids) : null; return $cat_ids ? implode(',', $cat_ids) : null;