X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-repair_amenu.php;h=83f62f7017d944d24b5217cc46e0aa3f405e275d;hp=50f949fb7cbd1213b122e951282fe6ab4ffe0afa;hb=f9a9c09e1ae257449bfd98f8854e321efba1dc3c;hpb=357b2ca133fc1f89db74097955c366cb4bee6996 diff --git a/inc/modules/admin/what-repair_amenu.php b/inc/modules/admin/what-repair_amenu.php index 50f949fb7c..83f62f7017 100644 --- a/inc/modules/admin/what-repair_amenu.php +++ b/inc/modules/admin/what-repair_amenu.php @@ -42,14 +42,14 @@ ADD_DESCR("admin", __FILE__); $ACTIONS = array(); // First fix all main menus (what="")... -$result_fix = SQL_QUERY("SELECT id, action FROM "._MYSQL_PREFIX."_admin_menu WHERE (what='' OR what IS NULL) AND action != 'logout' ORDER BY sort ASC", __FILE__, __LINE__); +$result_fix = SQL_QUERY("SELECT id, action FROM `"._MYSQL_PREFIX."_admin_menu` WHERE (what='' OR what IS NULL) AND action != 'logout' ORDER BY sort ASC", __FILE__, __LINE__); $cnt = 0; $REP = 0; while(list($id, $act) = SQL_FETCHROW($result_fix)) { // Store act value for later usage in sorting sub menus $ACTIONS[] = $act; // Fix weight - $result_sort = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admin_menu SET sort=%s WHERE id=%s LIMIT 1", + $result_sort = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_admin_menu` SET sort=%s WHERE id=%s LIMIT 1", array($cnt, $id), __FILE__, __LINE__); $REP += SQL_AFFECTEDROWS(); @@ -58,16 +58,16 @@ while(list($id, $act) = SQL_FETCHROW($result_fix)) { } // Set logout weight to 999 -$result_sort = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_admin_menu SET sort='999' WHERE action='logout' AND (what='' OR what IS NULL) LIMIT 1", __FILE__, __LINE__); +$result_sort = SQL_QUERY("UPDATE `"._MYSQL_PREFIX."_admin_menu` SET sort='999' WHERE action='logout' AND (what='' OR what IS NULL) LIMIT 1", __FILE__, __LINE__); // Now sort every each menu foreach ($ACTIONS as $act) { - $result_fix = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_admin_menu WHERE action='%s' AND what != '' AND what IS NOT NULL ORDER BY sort", + $result_fix = SQL_QUERY_ESC("SELECT id FROM `"._MYSQL_PREFIX."_admin_menu` WHERE action='%s' AND what != '' AND what IS NOT NULL ORDER BY sort", array($act), __FILE__, __LINE__); $cnt = 1; while (list($id) = SQL_FETCHROW($result_fix)) { // Fix weight - $result_sort = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admin_menu SET sort=%s WHERE id=%s LIMIT 1", + $result_sort = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_admin_menu` SET sort=%s WHERE id=%s LIMIT 1", array($cnt, $id), __FILE__, __LINE__); $REP += SQL_AFFECTEDROWS();