? 633778-conflic-with-theme_blocks.patch Index: context.core.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/context/Attic/context.core.inc,v retrieving revision 1.1.2.3.2.20.2.29 diff -u -p -r1.1.2.3.2.20.2.29 context.core.inc --- context.core.inc 5 Aug 2010 08:03:29 -0000 1.1.2.3.2.20.2.29 +++ context.core.inc 14 Oct 2010 17:16:38 -0000 @@ -100,15 +100,6 @@ function context_theme_registry_alter(&$ if (!in_array('context_page_alter', $theme_registry['page']['preprocess functions'])) { array_unshift($theme_registry['page']['preprocess functions'], 'context_page_alter'); } - // Reroute theme_blocks() through context_blocks to determine block - // visibility by context. Only override theme_blocks() if a theme - // has not overridden it. It is the responsibility of any themes - // implementing theme_blocks() to take advantage of context block - // visibility on their own. - if (!isset($theme_registry['blocks']['type']) || !in_array($theme_registry['blocks']['type'], array('base_theme_engine', 'theme_engine')) && !isset($theme_registry['blocks']['file'])) { - unset($theme_registry['blocks']['preprocess functions']); - $theme_registry['blocks']['function'] = 'context_blocks'; - } } /** @@ -213,20 +204,6 @@ function context_user($op, &$edit, &$acc } /** - * BLOCK HANDLING ===================================================== - */ - -/** - * This override of theme_blocks() is called because of an alter of the - * theme registry. See context_theme_registry_alter(). - */ -function context_blocks($region) { - if ($plugin = context_get_plugin('reaction', 'block')) { - return $plugin->execute($region); - } -} - -/** * THEME FUNCTIONS & RELATED ========================================== */ @@ -274,6 +251,20 @@ function context_links($reset = FALSE) { function context_page_alter(&$vars) { module_invoke_all('context_page_condition'); module_invoke_all('context_page_reaction'); + + // Block handling + if ($plugin = context_get_plugin('reaction', 'block')) { + global $theme; + // Populate all block regions. + $regions = system_region_list($theme); + // Load all region content assigned via blocks. + foreach (array_keys($regions) as $region) { + // Prevent left and right regions from rendering blocks when 'show_blocks' == FALSE. + if (!(!$variables['show_blocks'] && ($region == 'left' || $region == 'right'))) { + drupal_set_content($region, $plugin->execute($region)); + } + } + } } /**