Skip to content
Snippets Groups Projects
Commit 77af4539 authored by Neil Drumm's avatar Neil Drumm :wave:
Browse files

#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
......@@ -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
-----------------------
......
......@@ -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'])) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment