- #53857: External URL suppor for menus broken by SA-2006-001

4.6.x
Steven Wittens 2006-03-14 15:26:04 +00:00
parent 330dae8717
commit 7891e0491f
1 changed files with 4 additions and 1 deletions

View File

@ -855,7 +855,10 @@ function _menu_item_is_accessible($mid) {
$path = substr($path, 0, strrpos($path, '/'));
}
if (empty($path)) {
return FALSE;
// Items without any access attribute up the chain are denied, unless they
// were created by the admin. They most likely point to non-Drupal directories
// or to an external URL and should be allowed.
return $menu['items'][$mid]['type'] & MENU_CREATED_BY_ADMIN;
}
return $menu['items'][$menu['path index'][$path]]['access'];
}