Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-3443205
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
drupal-3443205
Commits
77af4539
Commit
77af4539
authored
15 years ago
by
Neil Drumm
Browse files
Options
Downloads
Patches
Plain Diff
#472160
by chx and Heine. Deny D6-style access elements.
parent
ab452bb7
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.txt
+2
-0
2 additions, 0 deletions
CHANGELOG.txt
includes/menu.inc
+8
-0
8 additions, 0 deletions
includes/menu.inc
with
10 additions
and
0 deletions
CHANGELOG.txt
+
2
−
0
View file @
77af4539
...
...
@@ -2,6 +2,8 @@
Drupal 5.20-dev xxxx-xx-xx
-----------------------
- The 'access' element for hook_menu() now interprets Drupal 6 style values,
like array('access content').
Drupal 5.19, 2009-07-01
-----------------------
...
...
This diff is collapsed.
Click to expand it.
includes/menu.inc
+
8
−
0
View file @
77af4539
...
...
@@ -1055,6 +1055,10 @@ function _menu_build() {
$temp_mid
=
-
1
;
foreach
(
$menu_item_list
as
$item
)
{
// Protect against D6 style access
if
(
isset
(
$item
[
'access'
])
&&
is_array
(
$item
[
'access'
])
&&
count
(
$item
[
'access'
])
==
1
&&
isset
(
$item
[
'access'
][
0
])
&&
is_string
(
$item
[
'access'
][
0
]))
{
$item
[
'access'
]
=
FALSE
;
}
if
(
!
isset
(
$item
[
'path'
]))
{
$item
[
'path'
]
=
''
;
}
...
...
@@ -1225,6 +1229,10 @@ function _menu_append_contextual_items() {
$new_items
=
array
();
foreach
(
$menu_item_list
as
$item
)
{
// Protect against D6 style access
if
(
isset
(
$item
[
'access'
])
&&
is_array
(
$item
[
'access'
])
&&
count
(
$item
[
'access'
])
==
1
&&
isset
(
$item
[
'access'
][
0
])
&&
is_string
(
$item
[
'access'
][
0
]))
{
$item
[
'access'
]
=
FALSE
;
}
if
(
isset
(
$item
[
'callback'
]))
{
$_menu
[
'callbacks'
][
$item
[
'path'
]]
=
array
(
'callback'
=>
$item
[
'callback'
]);
if
(
isset
(
$item
[
'callback arguments'
]))
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment