diff options
author | Gerhard Killesreiter <killes_www_drop_org@227.no-reply.drupal.org> | 2006-04-07 11:28:20 +0000 |
---|---|---|
committer | Gerhard Killesreiter <killes_www_drop_org@227.no-reply.drupal.org> | 2006-04-07 11:28:20 +0000 |
commit | c706d11a0d1c69805937ff703b0a93951ae2c5e7 (patch) | |
tree | 8d333b60d435128927c3c9a7238fa6fbcdeb75ed /includes | |
parent | 9814b832b287455d662d0468a1890f4bcc7cf4ab (diff) | |
download | brdo-c706d11a0d1c69805937ff703b0a93951ae2c5e7.tar.gz brdo-c706d11a0d1c69805937ff703b0a93951ae2c5e7.tar.bz2 |
#16542, add db rewriting for menus, patch by chx
fixes 57406 too
Diffstat (limited to 'includes')
-rw-r--r-- | includes/database.inc | 4 | ||||
-rw-r--r-- | includes/menu.inc | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/includes/database.inc b/includes/database.inc index c7903ef16..548e310e5 100644 --- a/includes/database.inc +++ b/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 = '', $primary_table = 'n', $primary_field = 'ni * @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 diff --git a/includes/menu.inc b/includes/menu.inc index ee1fe0b43..661f9db88 100644 --- a/includes/menu.inc +++ b/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])) { |