Index: includes/menu.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/menu.inc,v retrieving revision 1.255.2.27 diff -u -r1.255.2.27 menu.inc --- includes/menu.inc 10 Nov 2008 17:30:39 -0000 1.255.2.27 +++ includes/menu.inc 26 Jan 2009 18:42:50 -0000 @@ -771,11 +771,16 @@ * A fully loaded menu link, or NULL. If a link is supplied, only the * path to root will be included in the returned tree- as if this link * represented the current page in a visible menu. + * @param $reset + * Reset the static cache of the menu tree. * @return * An tree of menu links in an array, in the order they should be rendered. */ -function menu_tree_all_data($menu_name = 'navigation', $item = NULL) { +function menu_tree_all_data($menu_name = 'navigation', $item = NULL, $reset = FALSE) { static $tree = array(); + if ($reset) { + $tree = array(); + } // Use $mlid as a flag for whether the data being loaded is for the whole tree. $mlid = isset($item['mlid']) ? $item['mlid'] : 0; @@ -1657,6 +1662,8 @@ _menu_navigation_links_rebuild($menu); // Clear the page and block caches. _menu_clear_page_cache(); + // Clear the menu tree cache. + menu_tree_all_data('navigation', NULL, TRUE); if (defined('MAINTENANCE_MODE')) { variable_set('menu_rebuild_needed', TRUE); }