diff options
author | Dries Buytaert <dries@buytaert.net> | 2007-04-24 08:26:58 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2007-04-24 08:26:58 +0000 |
commit | 768faa988bbc2d8df132bdb69ab8b428f3a30851 (patch) | |
tree | d1d51fc730269dbed2e28aff0b7352fa5731aff6 | |
parent | 2a2b7672398bed03fd37198c994942754f982110 (diff) | |
download | brdo-768faa988bbc2d8df132bdb69ab8b428f3a30851.tar.gz brdo-768faa988bbc2d8df132bdb69ab8b428f3a30851.tar.bz2 |
- Patch #138703 by chx: Menu inheritance is wrong.
-rw-r--r-- | includes/menu.inc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/includes/menu.inc b/includes/menu.inc index c7bee38bf..266a814c6 100644 --- a/includes/menu.inc +++ b/includes/menu.inc @@ -758,9 +758,10 @@ function menu_rebuild() { // Because access is checked for each visible parent as well, we only // inherit if arguments were given without a callback. Otherwise the - // inherited check would be identical to that of the parent. - if (!isset($item['access callback']) && isset($parent['access callback']) && !isset($parent['access inherited'])) { - if (isset($item['access arguments']) || !$parent['_visible']) { + // inherited check would be identical to that of the parent. We do + // not inherit from visible parents which are themselves inherited. + if (!isset($item['access callback']) && isset($parent['access callback']) && !(isset($parent['access inherited']) && $parent['_visible'])) { + if (isset($item['access arguments'])) { $item['access callback'] = $parent['access callback']; } else { |