Skip to content

Commit ef68bb6

Browse files
committed
fix(category): bad sub categories count
Signed-off-by: Thierry Bugier <[email protected]>
1 parent 1b70a25 commit ef68bb6

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
@@ -48,7 +48,7 @@ public static function getTypeName($nb = 1) {
4848

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

0 commit comments

Comments
 (0)