Skip to content

Commit

Permalink
upgrade menu sorted (#6586)
Browse files Browse the repository at this point in the history
Sets the list of menus to upgrade sorted ascending, and leaves 'default' menu as default selected for consistency and ease.
  • Loading branch information
chansizzle committed Mar 25, 2023
1 parent 8cdcd86 commit e905e7e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions core/upgrade/index.php
Expand Up @@ -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);
Expand Down

0 comments on commit e905e7e

Please sign in to comment.