diff options
author | webchick <webchick@24967.no-reply.drupal.org> | 2011-07-03 10:57:13 -0700 |
---|---|---|
committer | webchick <webchick@24967.no-reply.drupal.org> | 2011-07-03 10:57:13 -0700 |
commit | 03ff5386dde0511016f45c544e958b2f961a5d54 (patch) | |
tree | 93eb5fcd67d34cb8c24de596fcb7e7b8f3acc96b /modules/block | |
parent | d9e7c8012d2617bf3398814bd670f9f39257d4a7 (diff) | |
download | brdo-03ff5386dde0511016f45c544e958b2f961a5d54.tar.gz brdo-03ff5386dde0511016f45c544e958b2f961a5d54.tar.bz2 |
Issue #1103590 by dcrocks: Fixed blocks being added to 'hidden' region when theme first enabled.
Diffstat (limited to 'modules/block')
-rw-r--r-- | modules/block/block.module | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/block/block.module b/modules/block/block.module index 6b3b23afb..b2a3f0522 100644 --- a/modules/block/block.module +++ b/modules/block/block.module @@ -612,7 +612,8 @@ function block_theme_initialize($theme) { $has_blocks = (bool) db_query_range('SELECT 1 FROM {block} WHERE theme = :theme', 0, 1, array(':theme' => $theme))->fetchField(); if (!$has_blocks) { $default_theme = variable_get('theme_default', 'bartik'); - $regions = system_region_list($theme); + // Apply only to new theme's visible regions. + $regions = system_region_list($theme, REGIONS_VISIBLE); $result = db_query("SELECT * FROM {block} WHERE theme = :theme", array(':theme' => $default_theme), array('fetch' => PDO::FETCH_ASSOC)); foreach ($result as $block) { // If the region isn't supported by the theme, assign the block to the theme's default region. |