summaryrefslogtreecommitdiff
path: root/modules/block
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-06-12 08:42:46 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-06-12 08:42:46 +0000
commitc0542917e599cb617e0bd73bd700da4a5d52f404 (patch)
treea106fd43f2e2893443a6fcc8c0f683a92d122803 /modules/block
parentc2e2974f0b87e372caca065611423c27d00436b2 (diff)
downloadbrdo-c0542917e599cb617e0bd73bd700da4a5d52f404.tar.gz
brdo-c0542917e599cb617e0bd73bd700da4a5d52f404.tar.bz2
#687666 by tstoeckler, David_Rothstein: Fixed block static cache a bit too static.
Diffstat (limited to 'modules/block')
-rw-r--r--modules/block/block.module9
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/block/block.module b/modules/block/block.module
index 3770bb277..402f43a9e 100644
--- a/modules/block/block.module
+++ b/modules/block/block.module
@@ -242,6 +242,15 @@ function block_page_build(&$page) {
$page[$region] = $blocks;
}
}
+ // Once we've finished attaching all blocks to the page, clear the static
+ // cache to allow modules to alter the block list differently in different
+ // contexts. For example, any code that triggers hook_page_build() more
+ // than once in the same page request may need to alter the block list
+ // differently each time, so that only certain parts of the page are
+ // actually built. We do not clear the cache any earlier than this, though,
+ // because it is used each time block_get_blocks_by_region() gets called
+ // above.
+ drupal_static_reset('block_list');
}
else {
// Append region description if we are rendering the regions demo page.