From fbe674e263dea20320df957496abb24ab3196161 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Hojtsy?= Date: Mon, 1 Oct 2007 09:53:03 +0000 Subject: #179578 by pwolanin: multiple menu links to the same node were not shown (but were stored) --- includes/menu.inc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'includes') diff --git a/includes/menu.inc b/includes/menu.inc index 5f1bd6c3b..05ec4d86c 100644 --- a/includes/menu.inc +++ b/includes/menu.inc @@ -772,7 +772,7 @@ function menu_tree_collect_node_links(&$tree, &$node_links) { if ($tree[$key]['link']['router_path'] == 'node/%') { $nid = substr($tree[$key]['link']['link_path'], 5); if (is_numeric($nid)) { - $node_links[$nid] = &$tree[$key]['link']; + $node_links[$nid][$tree[$key]['link']['mlid']] = &$tree[$key]['link']; $tree[$key]['link']['access'] = FALSE; } } @@ -793,7 +793,10 @@ function menu_tree_check_access(&$tree, $node_links = array()) { $placeholders = '%d'. str_repeat(', %d', count($nids) - 1); $result = db_query(db_rewrite_sql("SELECT n.nid FROM {node} n WHERE n.nid IN (". $placeholders .")"), $nids); while ($node = db_fetch_array($result)) { - $node_links[$node['nid']]['access'] = TRUE; + $nid = $node['nid']; + foreach ($node_links[$nid] as $mlid => $link) { + $node_links[$nid][$mlid]['access'] = TRUE; + } } } _menu_tree_check_access($tree); -- cgit v1.2.3