diff --git a/inc/container.class.php b/inc/container.class.php index bba4e3d6..191843ee 100644 --- a/inc/container.class.php +++ b/inc/container.class.php @@ -1139,7 +1139,7 @@ public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) if (isset($itemtypes[$item->getType()])) { $tabs_entries = []; $container = new self(); - foreach ($itemtypes[$item->getType()] as $tab_name => $tab_label) { + foreach ($itemtypes[$item->getType()] as $tab_name) { // needs to check if entity of item is in hierachy of $tab_name foreach ($container->find(['is_active' => 1, 'name' => $tab_name]) as $data) { $dataitemtypes = json_decode($data['itemtypes']); @@ -1152,7 +1152,7 @@ public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) if (!$item->isEntityAssign() || in_array($item->fields['entities_id'], $entities)) { $display_condition = new PluginFieldsContainerDisplayCondition(); if ($display_condition->computeDisplayContainer($item, $data['id'])) { - $tabs_entries[$tab_name] = $tab_label; + $tabs_entries[$tab_name] = $data['label']; } } } diff --git a/inc/field.class.php b/inc/field.class.php index 8e32845d..45623071 100644 --- a/inc/field.class.php +++ b/inc/field.class.php @@ -512,7 +512,7 @@ public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) if (!$withtemplate) { switch ($item->getType()) { case __CLASS__: - $ong[1] = $this->getTypeName(1); + $ong[1] = "Test"; return $ong; }