]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-repair_amenu.php
Generic lock/unlock added, surfbar only needs dynamic payment model
[mailer.git] / inc / modules / admin / what-repair_amenu.php
index 9b6c69d37281813e2514443f9430a08ef04a46ff..34f4382be8865958528604ac55bac1099de7c119 100644 (file)
@@ -40,10 +40,9 @@ if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN()))
 // Add description as navigation point
 ADD_DESCR("admin", basename(__FILE__));
 
-global $link;
 $ACTIONS = array();
-// First fix all main menus (what='')...
-$result_fix = SQL_QUERY("SELECT id, action FROM "._MYSQL_PREFIX."_admin_menu WHERE what='' AND action != 'logout' ORDER BY sort ASC", __FILE__, __LINE__);
+// 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__);
 $cnt = 0; $REP = 0;
 while(list($id, $act) = SQL_FETCHROW($result_fix))
 {
@@ -58,7 +57,7 @@ while(list($id, $act) = SQL_FETCHROW($result_fix))
        $cnt++;
 }
 // Set logout weight to 999
-$result_sort = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_admin_menu SET sort='999' WHERE act='logout' AND what='' LIMIT 1", __FILE__, __LINE__);
+$result_sort = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_admin_menu SET sort='999' WHERE act='logout' AND (what='' OR what IS NULL) LIMIT 1", __FILE__, __LINE__);
 
 // Now sort every each menu
 foreach ($ACTIONS as $act)