Skip to content

Commit

Permalink
fix(category): bad sub categories count
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <[email protected]>
  • Loading branch information
btry committed Dec 3, 2019
1 parent ca0eb4e commit 40f8071
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inc/category.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public static function getTypeName($nb = 1) {

public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) {
$env = new self;
$found_env = $env->find();
$found_env = $env->find([static::getForeignKeyField() => $item->getID()]);
$nb = count($found_env);
return self::createTabEntry(self::getTypeName($nb), $nb);
}
Expand Down

0 comments on commit 40f8071

Please sign in to comment.