X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Ffix_menu.php;h=5fbfcab34de67a153b1efe2c87ebc0f0cc2a639c;hb=6bd47661d7ec406cd276f0835364b1e3f933d6c8;hp=da6e5dcf97ebc0efa53d8aa0deda9a10f5b4f52f;hpb=31281c21661cd6329c45305a0544268388801791;p=mailer.git diff --git a/inc/fix_menu.php b/inc/fix_menu.php index da6e5dcf97..5fbfcab34d 100644 --- a/inc/fix_menu.php +++ b/inc/fix_menu.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -43,7 +43,7 @@ if (!defined('__SECURITY')) { // Get all menus foreach (array('guest','member','admin') as $menu) { // Query it - $result = SQL_QUERY_ESC("SELECT `action`,`what` FROM `{?_MYSQL_PREFIX?}_%s_menu` ORDER BY `action` ASC, `what` ASC", + $result = SQL_QUERY_ESC("SELECT `action`, `what` FROM `{?_MYSQL_PREFIX?}_%s_menu` ORDER BY `action` ASC,`what` ASC", array($menu), __FILE__, __LINE__); // Init array @@ -59,10 +59,10 @@ foreach (array('guest','member','admin') as $menu) { // Double entry, so get count if (is_null($entry['what'])) { // Main menu - $entries = countSumTotalData($entry['action'], $menu . '_menu', 'action', 'action', true, " AND `what` IS NULL"); + $entries = countSumTotalData($entry['action'], $menu . '_menu', 'action', 'action', TRUE, " AND `what` IS NULL"); } else { // Sub menu - $entries = countSumTotalData($entry['action'], $menu . '_menu', 'action', 'action', true, sprintf(" AND `what`='%s'", $entry['what'])); + $entries = countSumTotalData($entry['action'], $menu . '_menu', 'action', 'action', TRUE, sprintf(" AND `what`='%s'", $entry['what'])); } //* DEBUG: */ debugOutput('menu='.$menu.',action='.$entry['action'].',what='.$entry['what'].',entries='.$entries); @@ -99,7 +99,7 @@ foreach (array('guest','member','admin') as $menu) { // Now insert our unqiue key for action-what combination addSql(sprintf("ALTER TABLE `{?_MYSQL_PREFIX?}_%s_menu` DROP KEY `action_what`", $menu)); - addSql(sprintf("ALTER TABLE `{?_MYSQL_PREFIX?}_%s_menu` ADD UNIQUE INDEX `action_what` (`action` , `what`)", $menu)); + addSql(sprintf("ALTER TABLE `{?_MYSQL_PREFIX?}_%s_menu` ADD UNIQUE INDEX `action_what` (`action`, `what`)", $menu)); // Now insert our unqiue key for what addSql(sprintf("ALTER TABLE `{?_MYSQL_PREFIX?}_%s_menu` DROP KEY `what`", $menu));