X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-repair_gmnu.php;h=63a9f4413ce8cc675bed9770b46e1fb78871be41;hp=ec446f9d8e8e1db0dc89e4ac1d5d2ac906e93d36;hb=0715fa7aa8e5e70bcf1d957fb09ae655c3896c4e;hpb=039203d5428c9c6a3bed61fb3a9a16958c6fd44c diff --git a/inc/modules/admin/what-repair_gmnu.php b/inc/modules/admin/what-repair_gmnu.php index ec446f9d8e..63a9f4413c 100644 --- a/inc/modules/admin/what-repair_gmnu.php +++ b/inc/modules/admin/what-repair_gmnu.php @@ -18,6 +18,7 @@ * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * + * Copyright (c) 2009, 2010 by Mailer Developer Team * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -53,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 @@ -66,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