X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-repair_gmnu.php;h=63a9f4413ce8cc675bed9770b46e1fb78871be41;hb=00974432ffe0ed217b993e1ea5aaaac7dc31e82b;hp=d2d4a027c8b44c1d1b46269903f7c1c8eebe7331;hpb=09f5758c42a33a56bdd461c946ffe759a59c54aa;p=mailer.git diff --git a/inc/modules/admin/what-repair_gmnu.php b/inc/modules/admin/what-repair_gmnu.php index d2d4a027c8..63a9f4413c 100644 --- a/inc/modules/admin/what-repair_gmnu.php +++ b/inc/modules/admin/what-repair_gmnu.php @@ -54,7 +54,10 @@ while ($content = SQL_FETCHARRAY($result_fix)) { $ACTIONS[] = $content['action']; // Fix weight - $result_sort = SQL_QUERY("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET sort='".$cnt."' WHERE `id`='".$content['id']."' LIMIT 1", __FILE__, __LINE__); + $result_sort = SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `sort`='%s WHERE `id`=%s' LIMIT 1", + array($cnt, $content['id']), __FILE__, __LINE__); + + // Get updated rows $REP += SQL_AFFECTEDROWS(); // Count one up @@ -67,7 +70,7 @@ $result_sort = SQL_QUERY("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET sort='999' W // Now sort every each menu foreach ($ACTIONS as $action) { $result_fix = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`", - array($action), __FILE__, __LINE__); + array($action), __FILE__, __LINE__); $cnt = 1; while ($content = SQL_FETCHARRAY($result_fix)) { // Fix weight