Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
fbe674e2
Commit
fbe674e2
authored
Oct 01, 2007
by
Gábor Hojtsy
Browse files
#179578
by pwolanin: multiple menu links to the same node were not shown (but were stored)
parent
888fd641
Changes
1
Hide whitespace changes
Inline
Side-by-side
includes/menu.inc
View file @
fbe674e2
...
@@ -772,7 +772,7 @@ function menu_tree_collect_node_links(&$tree, &$node_links) {
...
@@ -772,7 +772,7 @@ function menu_tree_collect_node_links(&$tree, &$node_links) {
if
(
$tree
[
$key
][
'link'
][
'router_path'
]
==
'node/%'
)
{
if
(
$tree
[
$key
][
'link'
][
'router_path'
]
==
'node/%'
)
{
$nid
=
substr
(
$tree
[
$key
][
'link'
][
'link_path'
],
5
);
$nid
=
substr
(
$tree
[
$key
][
'link'
][
'link_path'
],
5
);
if
(
is_numeric
(
$nid
))
{
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
;
$tree
[
$key
][
'link'
][
'access'
]
=
FALSE
;
}
}
}
}
...
@@ -793,7 +793,10 @@ function menu_tree_check_access(&$tree, $node_links = array()) {
...
@@ -793,7 +793,10 @@ function menu_tree_check_access(&$tree, $node_links = array()) {
$placeholders
=
'%d'
.
str_repeat
(
', %d'
,
count
(
$nids
)
-
1
);
$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
);
$result
=
db_query
(
db_rewrite_sql
(
"SELECT n.nid FROM
{
node
}
n WHERE n.nid IN ("
.
$placeholders
.
")"
),
$nids
);
while
(
$node
=
db_fetch_array
(
$result
))
{
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
);
_menu_tree_check_access
(
$tree
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment