diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-10-01 09:53:03 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-10-01 09:53:03 +0000 |
commit | fbe674e263dea20320df957496abb24ab3196161 (patch) | |
tree | 351fa8fd9ef9e62b712b964fea883ec7dd6d7696 | |
parent | 888fd6415f8868578a8a6b24d7ad1e7b624b59d5 (diff) | |
download | brdo-fbe674e263dea20320df957496abb24ab3196161.tar.gz brdo-fbe674e263dea20320df957496abb24ab3196161.tar.bz2 |
#179578 by pwolanin: multiple menu links to the same node were not shown (but were stored)
-rw-r--r-- | includes/menu.inc | 7 |
1 files changed, 5 insertions, 2 deletions
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); |