Skip to content

Commit

Permalink
Navigation: 37409 check if type of item is a known plugin id (ILIAS-e…
Browse files Browse the repository at this point in the history
  • Loading branch information
shecken authored Oct 23, 2023
1 parent f8022b9 commit 602fadc
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions Services/Navigation/classes/class.ilNavigationHistory.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,10 @@ public function getItems(): array
$tree->isInTree($it["ref_id"]) &&
(
!$objDefinition->isPluginTypeName($it["type"]) ||
$component_repository->getPluginById($it["type"])->isActive()
(
$component_repository->hasPluginId($it["type"]) &&
$component_repository->getPluginById($it["type"])->isActive()
)
)
) {
$items[$it["ref_id"] . ":" . $it["sub_obj_id"]] = $it;
Expand All @@ -144,11 +147,18 @@ public function getItems(): array
$cnt = count($items);
if (is_array($db_entries)) {
foreach ($db_entries as $rec) {
if ($cnt <= 10 && !isset($items[$rec["ref_id"] . ":" . $rec["sub_obj_id"]]) && $tree->isInTree((int) $rec["ref_id"]) &&
if (
$cnt <= 10 &&
!isset($items[$rec["ref_id"] . ":" . $rec["sub_obj_id"]]) &&
$tree->isInTree((int) $rec["ref_id"]) &&
(
!$objDefinition->isPluginTypeName($rec["type"]) ||
$component_repository->getPluginById($rec["type"])->isActive()
)) {
(
$component_repository->hasPluginId($rec["type"]) &&
$component_repository->getPluginById($rec["type"])->isActive()
)
)
) {
$link = ($rec["goto_link"] != "")
? $rec["goto_link"]
: ilLink::_getLink((int) $rec["ref_id"]);
Expand Down

0 comments on commit 602fadc

Please sign in to comment.