]> git.mxchange.org Git - mailer.git/blobdiff - inc/fix_menu.php
More rewrites to make use of (cached) wrapper functions
[mailer.git] / inc / fix_menu.php
index 31d3f96ff73363aabc217aadc84827305b96dbdf..469e22dee847c87bbf835f752ce9472f89bcc13b 100644 (file)
@@ -66,7 +66,7 @@ foreach (array('guest','member','admin') as $menu) {
                                // Sub menu
                                $entries = countSumTotalData($entry['action'], $menu . '_menu', 'action', 'action', true, sprintf(" AND `what`='%s'", $entry['what']));
                        }
-                       //* DEBUG: */ print 'menu='.$menu.',action='.$entry['action'].',what='.$entry['what'].',entries='.$entries.'<br />';
+                       //* DEBUG: */ debugOutput('menu='.$menu.',action='.$entry['action'].',what='.$entry['what'].',entries='.$entries);
 
                        // Only remove if we have at least 2 entries from same menu
                        if ($entries > 1) {
@@ -74,11 +74,20 @@ foreach (array('guest','member','admin') as $menu) {
                                if (is_null($entry['what'])) {
                                        // Main menu is double
                                        SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_%s_menu` WHERE `action`='%s' AND `what` IS NULL LIMIT %s",
-                                               array($menu, $entry['action'], ($entries - 1)), __FILE__, __LINE__);
+                                               array(
+                                                       $menu,
+                                                       $entry['action'],
+                                                       ($entries - 1)
+                                               ), __FILE__, __LINE__);
                                } else {
                                        // Sub menu is double
                                        SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_%s_menu` WHERE `action`='%s' AND `what`='%s' LIMIT %s",
-                                               array($menu, $entry['action'], $entry['what'], ($entries - 1)), __FILE__, __LINE__);
+                                               array(
+                                                       $menu,
+                                                       $entry['action'],
+                                                       $entry['what'],
+                                                       ($entries - 1)
+                                               ), __FILE__, __LINE__);
                                }
                        } // END - if
                }