=== modified file 'includes/database.inc' --- includes/database.inc +++ includes/database.inc @@ -223,7 +223,7 @@ function db_queryd($query) { * @param $query * Query to be rewritten. * @param $primary_table - * Name or alias of the table which has the primary key field for this query. Possible values are: comments, forum, node, term_data, vocabulary. + * Name or alias of the table which has the primary key field for this query. Possible values are: comments, forum, node, menu, term_data, vocabulary. * @param $primary_field * Name of the primary field. * @param $args @@ -266,7 +266,7 @@ function _db_rewrite_sql($query = '', $p * @param $query * Query to be rewritten. * @param $primary_table - * Name or alias of the table which has the primary key field for this query. Possible values are: comments, forum, node, term_data, vocabulary. + * Name or alias of the table which has the primary key field for this query. Possible values are: comments, forum, node, menu, term_data, vocabulary. * @param $primary_field * Name of the primary field. * @param $args === modified file 'includes/menu.inc' --- includes/menu.inc +++ includes/menu.inc @@ -1052,7 +1052,7 @@ function _menu_build() { // Now fetch items from the DB, reassigning menu IDs as needed. if (module_exist('menu')) { - $result = db_query('SELECT * FROM {menu} ORDER BY mid ASC'); + $result = db_query(db_rewrite_sql('SELECT m.mid, m.* FROM {menu} m ORDER BY m.mid ASC', 'm', 'mid')); while ($item = db_fetch_object($result)) { // Handle URL aliases if entered in menu administration. if (!isset($_menu['path index'][$item->path])) {