X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-guest_add.php;h=1728bdd49809636cb9b9bb9f6b49c96aefed4e8c;hb=c3f2beb3f1d47c9593d262d7f5dac47640b4aa52;hp=f23636efd305a9b921f88c0ee0f8564dc417c357;hpb=64c8349613addc3da2242c5cd6b99d64e3fb5f8e;p=mailer.git diff --git a/inc/modules/admin/what-guest_add.php b/inc/modules/admin/what-guest_add.php index f23636efd3..1728bdd498 100644 --- a/inc/modules/admin/what-guest_add.php +++ b/inc/modules/admin/what-guest_add.php @@ -1,7 +1,7 @@ 0) { // Read menu structure // @TODO Cant this be rewritten? @@ -93,10 +100,17 @@ if (!isFormSent()) { // Load sub menus :) foreach ($menus as $key_main => $value_main) { - $result = SQL_QUERY_ESC("SELECT what, title, sort -FROM `{?_MYSQL_PREFIX?}_guest_menu` -WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`", - array($value_main), __FILE__, __LINE__); + // Query for sub menus + $result = SQL_QUERY_ESC("SELECT + `what`, `title`, `sort` +FROM + `{?_MYSQL_PREFIX?}_guest_menu` +WHERE + `action`='%s' AND + `what` != '' AND + `what` IS NOT NULL +ORDER BY `sort` ASC", + array($value_main), __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { // Initialize arrays $menus[$value_main] = array(); @@ -106,7 +120,7 @@ WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`", // Read menu structure while ($content = SQL_FETCHARRAY($result)) { // Menu actions - $menus[$value_main][] = $content['action']; + $menus[$value_main][] = $content['what']; // Menu titles $titles[$value_main][] = $content['title']; @@ -140,7 +154,7 @@ WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`", } $OUT = "