Skip to content

Commit

Permalink
fix(category): use short name
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
  • Loading branch information
btry committed May 14, 2020
1 parent 9b59e45 commit ddf3eff
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions inc/category.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ public static function getCategoryTree($rootId = 0, $helpdeskHome = false) {
$categories = [];
foreach($result as $category) {
$category['name'] = Dropdown::getDropdownName($cat_table, $category['id'], 0, true, false);
// Keep the short name only
// If a symbol > exists in a name, it is saved as an html entity, making the following reliable
$split = explode(' > ', $category['name']);
$category['name'] = array_pop($split);
$categories[$category['id']] = $category;
}

Expand Down

0 comments on commit ddf3eff

Please sign in to comment.