Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
drupal
Commits
a1537c3e
Commit
a1537c3e
authored
Jun 12, 2008
by
Dries
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Patch
#266596
by pwolanin: menu system performance improvement.
parent
aa8c6466
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
includes/menu.inc
includes/menu.inc
+9
-4
No files found.
includes/menu.inc
View file @
a1537c3e
...
...
@@ -622,8 +622,11 @@ function _menu_translate(&$router_item, $map, $to_arg = FALSE) {
$router_item
[
'href'
]
=
implode
(
'/'
,
$link_map
);
$router_item
[
'options'
]
=
array
();
_menu_check_access
(
$router_item
,
$map
);
_menu_item_localize
(
$router_item
,
$map
);
// For performance, don't localize an item the user can't access.
if
(
$router_item
[
'access'
])
{
_menu_item_localize
(
$router_item
,
$map
);
}
return
$map
;
}
...
...
@@ -701,8 +704,10 @@ function _menu_link_translate(&$item) {
}
_menu_check_access
(
$item
,
$map
);
}
_menu_item_localize
(
$item
,
$map
,
TRUE
);
// For performance, don't localize a link the user can't access.
if
(
$item
[
'access'
])
{
_menu_item_localize
(
$item
,
$map
,
TRUE
);
}
}
// Allow other customizations - e.g. adding a page-specific query string to the
...
...
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