diff --git includes/menu.inc includes/menu.inc index b28a1b3..c682d42 100644 --- includes/menu.inc +++ includes/menu.inc @@ -404,13 +404,7 @@ function menu_set_item($path, $router_item) { * objects loaded. */ function menu_get_item($path = NULL, $router_item = NULL) { - // Use the advanced drupal_static() pattern, since this is called very often. - static $drupal_static_fast; - if (!isset($drupal_static_fast)) { - $drupal_static_fast['items'] = &drupal_static(__FUNCTION__); - } - $router_items = &$drupal_static_fast['items']; - + $router_items = &drupal_static(__FUNCTION__); if (!isset($path)) { $path = $_GET['q']; } @@ -802,7 +796,7 @@ function menu_tail_to_arg($arg, $map, $index) { * @param $translate * (optional) Whether to try to translate a link containing dynamic path * argument placeholders (%) based on the menu router item of the current - * path. Defaults to FALSE. Internally used for breadcrumbs only. + * path. Defaults to FALSE. Internally used for breadcrumbs. * * @return * Returns the map of path arguments with objects loaded as defined in the @@ -834,7 +828,7 @@ function _menu_link_translate(&$item, $translate = FALSE) { _menu_link_map_translate($map, $item['to_arg_functions']); } // Or try to derive the path argument map from the current router item, - // if this $item's path is within ) the router item's path. This means + // if this $item's path is within the router item's path. This means // that if we are on the current path 'foo/%/bar/%/baz', then // menu_get_item() will have translated the menu router item for the // current path, and we can take over the argument map for a link like @@ -1241,7 +1235,7 @@ function menu_tree_page_data($menu_name, $max_depth = NULL, $only_active_trail = * currently active menu link. * - only_active_trail: Whether to only return links that are in the active * trail. This option is ignored, if 'expanded' is non-empty. Internally - * used for breadcrumbs only. + * used for breadcrumbs. * - min_depth: The minimum depth of menu links in the resulting tree. * Defaults to 1, which is the default to build a whole tree for a menu, i.e. * excluding menu container itself.