mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Categories are ordered by the SQL Query
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user