$cnt++;
}
// Set logout weight to 999
-SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET sort='999' WHERE action='logout' AND (what='' OR `what` IS NULL) LIMIT 1", __FILE__, __LINE__);
+SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_member_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!}_member_menu` WHERE action='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`",
+ $result_fix = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_member_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)) {
}
// Repair finished
-LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_REPAIR_ENTRIES_FIXED_1.$REP.ADMIN_REPAIR_ENTRIES_FIXED_2);
+if ($REP > 0) {
+ $MSG = sprintf(getMessage('ADMIN_REPAIR_ENTRIES_FIXED'), $REP);
+} else {
+ $MSG = getMessage('ADMIN_REPAIR_NOTHING_FIXED');
+}
+
+// Output message
+LOAD_TEMPLATE("admin_settings_saved", false, $MSG);
//
?>