Categories are ordered by the SQL Query

This commit is contained in:
FusionPBX
2024-09-03 22:54:35 -06:00
committed by GitHub
parent 3b521d5150
commit 91db42f1e3

View File

@@ -202,6 +202,14 @@
//get the list of categories
if (!empty($default_setting_categories)) {
//show the array
$categories = [];
//add custom to the list of categories
$categories['custom']['formatted'] = 'Custom';
$categories['custom']['count'] = null;
//add the other catefories to the array
foreach ($default_setting_categories as $default_setting_category => $quantity) {
$category = strtolower($default_setting_category);
switch ($category) {
@@ -218,13 +226,6 @@
$categories[$default_setting_category]['count'] = $quantity;
}
//add custom to the list of categories
$categories['custom']['formatted'] = 'Custom';
$categories['custom']['count'] = null;
//sort the categories
ksort($categories);
//unset variables
unset($default_setting_categories, $default_setting_category, $category);
}