PMCORE-2672 'Admin' option is duplicate in the list
This commit is contained in:
@@ -395,6 +395,18 @@ try {
|
|||||||
break;
|
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));
|
print(G::json_encode($rows));
|
||||||
break;
|
break;
|
||||||
case 'defaultCasesMenuOptionList':
|
case 'defaultCasesMenuOptionList':
|
||||||
|
|||||||
Reference in New Issue
Block a user