diff --git a/core/includes/menu.inc b/core/includes/menu.inc index bf3c9f2..ce26553 100644 --- a/core/includes/menu.inc +++ b/core/includes/menu.inc @@ -1065,7 +1065,7 @@ function menu_tree($menu_name) { * @param array $tree * A data structure representing the tree as returned from menu_tree_data. * @param bool $add_active_classes - * (optional) Whether to mark items in the active trail with appriate CSS + * (optional) Whether to mark items in the active trail with appriate CSS * classes. If turned off, the data is useful for caching. * * @return @@ -1423,8 +1423,8 @@ function menu_build_tree($menu_name, array $parameters = array()) { // If there's no active trail tracking, then add per-user caching of the // localized, access-filtered menu subtrees. else { - $user = \Drupal::request()->attributes->get('account'); - $language_interface = language(Language::TYPE_INTERFACE); + $user = \Drupal::request()->attributes->get('_account'); + $language_interface = \Drupal::languageManager()->getLanguage(Language::TYPE_INTERFACE); $trees = &drupal_static(__FUNCTION__, array()); $subtrees = array(); @@ -1446,7 +1446,7 @@ function menu_build_tree($menu_name, array $parameters = array()) { // Retrieve each access-filtered and localized subtree. foreach ($subtree_parameters as $plid => $parameters) { - $cid = 'links:' . $menu_name . ':tree-data-localized:' . $user->uid . ':' . $language_interface->langcode . ':' . hash('sha256', serialize($parameters)); + $cid = 'links:' . $menu_name . ':tree-data-localized:' . $user->id() . ':' . $language_interface->id . ':' . hash('sha256', serialize($parameters)); // If we do not have this tree in the static cache, check {cache_menu}. if (!isset($trees[$cid])) { diff --git a/core/modules/toolbar/toolbar.module b/core/modules/toolbar/toolbar.module index e6027dd..c3706ad 100644 --- a/core/modules/toolbar/toolbar.module +++ b/core/modules/toolbar/toolbar.module @@ -171,13 +171,13 @@ function toolbar_page_build(&$page) { $t1 = microtime(TRUE); $element = menu_tree_output($tree, FALSE); $element['#cache'] = array( - 'bin' => 'cache_menu', + 'bin' => 'menu', 'granularity' => DRUPAL_CACHE_PER_USER, 'keys' => array('html', $menu, 'all', $depth), ); $rendered = drupal_render($element); $t2 = microtime(TRUE); - $output = '
' . implode('
', array(1000*($t1-$t0), 1000*($t2-$t1))) . '
' . $rendered; + $output = '
' . implode('
', array(1000*($t1-$t0), 1000*($t2-$t1))) . '
' . $rendered; $page['page_bottom']['toolbar_tmp'] = array('#markup' => $output); } }