]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-repair_mmenu.php
Improvements to task extension
[mailer.git] / inc / modules / admin / what-repair_mmenu.php
index 0bb45740ece012887e79a5f5db3bac82dfec6165..23d67de7f28577cb32e28f75ea0c88c8bd1f2ede 100644 (file)
@@ -42,7 +42,7 @@ 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__);
+$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)