diff --git a/inc/category.class.php b/inc/category.class.php index 19b8d8c3f..1fbdff3dc 100644 --- a/inc/category.class.php +++ b/inc/category.class.php @@ -53,7 +53,7 @@ public static function getTypeName($nb = 1) { public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) { $env = new self; $found_env = $env->find([static::getForeignKeyField() => $item->getID()]); - $nb = count($found_env); + $nb = $_SESSION['glpishow_count_on_tabs'] ? count($found_env) : 0; return self::createTabEntry(self::getTypeName($nb), $nb); } diff --git a/inc/form.class.php b/inc/form.class.php index 92c3e984f..339630100 100644 --- a/inc/form.class.php +++ b/inc/form.class.php @@ -570,7 +570,7 @@ public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) { return [ 1 => self::createTabEntry( _n('Target', 'Targets', $nb, 'formcreator'), - $item->countTargets() + $nb ), 2 => __('Preview'), 3 => __('Form answer properties', 'formcreator'),