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
a177c296
Commit
a177c296
authored
Jan 20, 2006
by
Dries
Browse files
- Patch
#40849
by wtanaka and Richard: killed some menu.inc warnings/notices.
parent
9c4d4fe7
Changes
1
Hide whitespace changes
Inline
Side-by-side
includes/menu.inc
View file @
a177c296
...
...
@@ -650,7 +650,9 @@ function menu_tree($pid = 1) {
if
(
isset
(
$menu
[
'visible'
][
$pid
])
&&
$menu
[
'visible'
][
$pid
][
'children'
])
{
foreach
(
$menu
[
'visible'
][
$pid
][
'children'
]
as
$mid
)
{
$output
.
=
theme
(
'menu_item'
,
$mid
,
menu_in_active_trail
(
$mid
)
||
(
$menu
[
'visible'
][
$mid
][
'type'
]
&
MENU_EXPANDED
)
?
theme
(
'menu_tree'
,
$mid
)
:
''
,
count
(
$menu
[
'visible'
][
$mid
][
'children'
])
==
0
);
$type
=
isset
(
$menu
[
'visible'
][
$mid
][
'type'
])
?
$menu
[
'visible'
][
$mid
][
'type'
]
:
NULL
;
$children
=
isset
(
$menu
[
'visible'
][
$mid
][
'children'
])
?
$menu
[
'visible'
][
$mid
][
'children'
]
:
NULL
;
$output
.
=
theme
(
'menu_item'
,
$mid
,
menu_in_active_trail
(
$mid
)
||
(
$type
&
MENU_EXPANDED
)
?
theme
(
'menu_tree'
,
$mid
)
:
''
,
count
(
$children
)
==
0
);
}
}
...
...
@@ -1118,7 +1120,7 @@ function _menu_item_is_accessible($mid) {
$menu
=
menu_get_menu
();
// Follow the path up to find the first "access" attribute.
$path
=
$menu
[
'items'
][
$mid
][
'path'
];
$path
=
isset
(
$menu
[
'items'
][
$mid
][
'path'
]
)
?
$menu
[
'items'
][
$mid
][
'path'
]
:
NULL
;
while
(
$path
&&
(
!
isset
(
$menu
[
'path index'
][
$path
])
||
!
isset
(
$menu
[
'items'
][
$menu
[
'path index'
][
$path
]][
'access'
])))
{
$path
=
substr
(
$path
,
0
,
strrpos
(
$path
,
'/'
));
}
...
...
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