Skip to content

Commit 40f8071

Browse files
committed
fix(category): bad sub categories count
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
1 parent ca0eb4e commit 40f8071

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

inc/category.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public static function getTypeName($nb = 1) {
4646

4747
public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) {
4848
$env = new self;
49-
$found_env = $env->find();
49+
$found_env = $env->find([static::getForeignKeyField() => $item->getID()]);
5050
$nb = count($found_env);
5151
return self::createTabEntry(self::getTypeName($nb), $nb);
5252
}

0 commit comments

Comments
 (0)