X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Ffix_menu.php;h=6dec7b19c795cdfb260976a180ddd12a5bdb77da;hb=ca11996eb52fa0a1ec45d6ab10f5331c4a54a116;hp=994ecfc831e317c0a6bddf03806769eda498d816;hpb=c8d76610eb94093d4eed4fcd8a6cb72e74c8f6d8;p=mailer.git diff --git a/inc/fix_menu.php b/inc/fix_menu.php index 994ecfc831..6dec7b19c7 100644 --- a/inc/fix_menu.php +++ b/inc/fix_menu.php @@ -16,8 +16,8 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009, 2010 by Mailer Developer Team * - * For more information visit: http://www.mxchange.org * + * 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 * * it under the terms of the GNU General Public License as published by * @@ -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 @@ -99,11 +99,11 @@ 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 `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)); - addSql(sprintf("ALTER TABLE `{?_MYSQL_PREFIX?}_%s_menu` ADD UNIQUE `what` (`what`)", $menu)); + addSql(sprintf("ALTER TABLE `{?_MYSQL_PREFIX?}_%s_menu` ADD UNIQUE INDEX `what` (`what`)", $menu)); // And run all runFilterChain('run_sqls');