]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-repair_mmenu.php
Surfbar now has admin menu (dummy extension!), menu system rebuilded for unique key...
[mailer.git] / inc / modules / admin / what-repair_mmenu.php
index a7320f76e70033e44e29f75f04723e68c1ebf4d7..23d67de7f28577cb32e28f75ea0c88c8bd1f2ede 100644 (file)
@@ -41,8 +41,8 @@ if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN()))
 ADD_DESCR("admin", basename(__FILE__));
 
 $ACTIONS = array();
-// First fix all main menus (what='')...
-$result_fix = SQL_QUERY("SELECT id, action FROM "._MYSQL_PREFIX."_member_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."_member_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))
 {
@@ -57,7 +57,7 @@ while(list($id, $act) = SQL_FETCHROW($result_fix))
        $cnt++;
 }
 // Set logout weight to 999
-$result_sort = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_member_menu SET sort='999' WHERE action='logout' AND what='' LIMIT 1", __FILE__, __LINE__);
+$result_sort = 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)