We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5d6f1d3 commit 9dfc3b8Copy full SHA for 9dfc3b8
inc/form_language.class.php
@@ -64,9 +64,12 @@ public function defineTabs($options = []) {
64
65
public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) {
66
if ($item instanceof PluginFormcreatorForm) {
67
- $nb = (new DbUtils())->countElementsInTable(self::getTable(), [
68
- 'plugin_formcreator_forms_id' => $item->getID(),
69
- ]);
+ $nb = 0;
+ if ($_SESSION['glpishow_count_on_tabs']) {
+ $nb = (new DbUtils())->countElementsInTable(self::getTable(), [
70
+ 'plugin_formcreator_forms_id' => $item->getID(),
71
+ ]);
72
+ }
73
return self::createTabEntry(
74
self::getTypeName(Session::getPluralNumber()),
75
$nb
0 commit comments