Commit fbe674e2 authored by Gábor Hojtsy's avatar Gábor Hojtsy

#179578 by pwolanin: multiple menu links to the same node were not shown (but were stored)

parent 888fd641
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment