summaryrefslogtreecommitdiff
path: root/modules/menu
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2007-08-19 08:08:45 +0000
committerDries Buytaert <dries@buytaert.net>2007-08-19 08:08:45 +0000
commit74292cd0625032180b2d178ae1c57e51462f121e (patch)
tree79ffaafcf1cd4c7b4a2dd2d33512228a0efb597c /modules/menu
parente9c36f969752488ca33da745b15805c489932a30 (diff)
downloadbrdo-74292cd0625032180b2d178ae1c57e51462f121e.tar.gz
brdo-74292cd0625032180b2d178ae1c57e51462f121e.tar.bz2
- Patch #80951 by killes, yched et al: block caching.
Diffstat (limited to 'modules/menu')
-rw-r--r--modules/menu/menu.module5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/menu/menu.module b/modules/menu/menu.module
index be44c1330..f9ad1a31c 100644
--- a/modules/menu/menu.module
+++ b/modules/menu/menu.module
@@ -404,7 +404,7 @@ function menu_parent_options($menus, $item) {
// If the item has children, there is an added limit to the depth of valid parents.
$limit = MENU_MAX_DEPTH - 1 - (($item['mlid'] && $item['has_children']) ? menu_link_children_relative_depth($item) : 0);
-
+
foreach ($menus as $menu_name => $title) {
$tree = menu_tree_all_data($menu_name, NULL);
$options[$menu_name .':0'] = '<'. $title .'>';
@@ -666,6 +666,9 @@ function menu_block($op = 'list', $delta = 0) {
foreach ($custom_menus as $name => $title) {
// Default "Navigation" block is handled by user.module.
$blocks[$name]['info'] = check_plain($title);
+ // Menu blocks can't be cached because each menu item can have
+ // a custom access callback. menu.inc manages its own caching.
+ $blocks[$name]['cache'] = BLOCK_NO_CACHE;
}
return $blocks;
}