Merged in bugfix/PMCORE-2672 (pull request #7703)
PMCORE-2672 'Admin' option is duplicate in the list Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
committed by
Julio Cesar Laura Avendaño
commit
4e46b568cf
@@ -395,6 +395,18 @@ try {
|
||||
break;
|
||||
}
|
||||
}
|
||||
//remove duplicate elements
|
||||
foreach ($rows as &$row) {
|
||||
$row = json_encode($row);
|
||||
}
|
||||
$rows = array_unique($rows);
|
||||
foreach ($rows as &$row) {
|
||||
$row = json_decode($row);
|
||||
}
|
||||
//sort items by name for pretty view
|
||||
usort($rows, function($a, $b) {
|
||||
return $a->name > $b->name;
|
||||
});
|
||||
print(G::json_encode($rows));
|
||||
break;
|
||||
case 'defaultCasesMenuOptionList':
|
||||
|
||||
Reference in New Issue
Block a user