diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-08-22 13:25:37 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-08-22 13:25:37 +0000 |
commit | 0ac8abb27f52669e1375fea2e11389e58315bb61 (patch) | |
tree | 852950be7e0356fa128711dcdc961c814724f589 /modules | |
parent | 94abfae9ac9ecd62e2056824e59b59a47e5f5ba0 (diff) | |
download | brdo-0ac8abb27f52669e1375fea2e11389e58315bb61.tar.gz brdo-0ac8abb27f52669e1375fea2e11389e58315bb61.tar.bz2 |
- Patch #137072 by ksenzee, rernst: block titles not copied on switching to a new theme.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/block/block.module | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/block/block.module b/modules/block/block.module index 97ab8dafb..e0c34d2ec 100644 --- a/modules/block/block.module +++ b/modules/block/block.module @@ -511,16 +511,15 @@ function block_theme_initialize($theme) { $default_theme = variable_get('theme_default', 'garland'); $regions = system_region_list($theme); $result = db_query("SELECT * FROM {block} WHERE theme = :theme", array(':theme' => $default_theme), array('fetch' => PDO::FETCH_ASSOC)); - $query = db_insert('block')->fields(array('module', 'delta', 'theme', 'status', 'weight', 'region', 'visibility', 'pages', 'custom', 'cache')); foreach ($result as $block) { // If the region isn't supported by the theme, assign the block to the theme's default region. if (!array_key_exists($block['region'], $regions)) { $block['region'] = system_default_region($theme); } $block['theme'] = $theme; - $query->values($block); + unset($block['bid']); + drupal_write_record('block', $block); } - $query->execute(); } } |