Skip to content

Commit ddf3eff

Browse files
committed
fix(category): use short name
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
1 parent 9b59e45 commit ddf3eff

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

inc/category.class.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,10 @@ public static function getCategoryTree($rootId = 0, $helpdeskHome = false) {
148148
$categories = [];
149149
foreach($result as $category) {
150150
$category['name'] = Dropdown::getDropdownName($cat_table, $category['id'], 0, true, false);
151+
// Keep the short name only
152+
// If a symbol > exists in a name, it is saved as an html entity, making the following reliable
153+
$split = explode(' > ', $category['name']);
154+
$category['name'] = array_pop($split);
151155
$categories[$category['id']] = $category;
152156
}
153157

0 commit comments

Comments
 (0)