function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) { $itemtype = $item->getType(); if ($itemtype == 'NetworkEquipment') { $itemtype = "networking"; } if ($item->getType() == 'PluginFusioninventoryConfig') { return PluginFusioninventoryLock::getTypeName(2); } if (Session::haveRight(strtolower($itemtype), UPDATE)) { if ($_SESSION['glpishow_count_on_tabs']) { return self::createTabEntry(PluginFusioninventoryLock::getTypeName(2), self::countForLock($item)); } return PluginFusioninventoryLock::getTypeName(2); } return ''; }