diff options
author | Dries Buytaert <dries@buytaert.net> | 2008-09-05 08:24:08 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2008-09-05 08:24:08 +0000 |
commit | 4231e3e98ba477e34a424bbc2e766e6f3ba42411 (patch) | |
tree | 110b586bb7511b6e0db3b309f6ffd19e25b4b45c /includes | |
parent | 98b4cdbeeeaeceb298cf6905d44e672bbf53a38d (diff) | |
download | brdo-4231e3e98ba477e34a424bbc2e766e6f3ba42411.tar.gz brdo-4231e3e98ba477e34a424bbc2e766e6f3ba42411.tar.bz2 |
- Patch #303827 by Damien Tournoud: fixed the menu system.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/menu.inc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/includes/menu.inc b/includes/menu.inc index 367369dcb..2f9183657 100644 --- a/includes/menu.inc +++ b/includes/menu.inc @@ -1719,7 +1719,7 @@ function menu_router_build($reset = FALSE) { static $menu; if (!isset($menu) || $reset) { - if (FALSE && !$reset && ($cache = cache_get('router:', 'cache_menu')) && isset($cache->data)) { + if (!$reset && ($cache = cache_get('router:', 'cache_menu')) && isset($cache->data)) { $menu = $cache->data; } else { @@ -1813,7 +1813,7 @@ function _menu_navigation_links_rebuild($menu) { db_query("UPDATE {menu_links} SET router_path = '%s', updated = %d WHERE mlid = %d", $router_path, $updated, $item['mlid']); } } - // Find any items where their router path does not exist any more. + // Find any item whose router path does not exist any more. $result = db_query("SELECT * FROM {menu_links} WHERE router_path NOT IN ($placeholders) AND external = 0 AND updated = 0 AND customized = 0 ORDER BY depth DESC", $paths); // Remove all such items. Starting from those with the greatest depth will // minimize the amount of re-parenting done by menu_link_delete(). @@ -2221,6 +2221,7 @@ function _menu_update_parental_status($item, $exclude = FALSE) { $query = db_select('menu_links', 'm'); $query->addField('m', 'mlid'); $query->condition('menu_name', $item['menu_name']); + $query->condition('hidden', 0); $query->condition('plid', $item['plid']); $query->range(0, 1); |