mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-09 10:08:23 +00:00
upgrade menu sorted (#6586)
Sets the list of menus to upgrade sorted ascending, and leaves 'default' menu as default selected for consistency and ease.
This commit is contained in:
@@ -237,12 +237,17 @@
|
||||
echo " <td width='70%' class='vtable' style='height: 50px; cursor: pointer;'>\n";
|
||||
echo "<input type='checkbox' name='action[menu_defaults]' id='do_menu' value='1' onclick=\"event.stopPropagation(); $('#sel_menu').fadeToggle('fast');\">";
|
||||
echo "<select name='sel_menu' id='sel_menu' class='formfld' style='display: none; vertical-align: middle; margin-left: 5px;' onclick=\"event.stopPropagation();\">";
|
||||
$sql = "select * from v_menus ";
|
||||
$sql = "select * from v_menus order by menu_name asc;";
|
||||
$database = new database;
|
||||
$result = $database->select($sql, null, 'all');
|
||||
if (is_array($result) && sizeof($result) != 0) {
|
||||
foreach ($result as &$row) {
|
||||
echo "<option value='".$row["menu_uuid"]."|".$row["menu_language"]."'>".$row["menu_name"]."</option>";
|
||||
if ($row["menu_name"] == 'default') {
|
||||
echo "<option selected value='".$row["menu_uuid"]."|".$row["menu_language"]."'>".$row["menu_name"]."</option>";
|
||||
}
|
||||
else {
|
||||
echo "<option value='".$row["menu_uuid"]."|".$row["menu_language"]."'>".$row["menu_name"]."</option>";
|
||||
}
|
||||
}
|
||||
}
|
||||
unset ($sql, $result);
|
||||
|
||||
Reference in New Issue
Block a user