summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-08-22 13:25:37 +0000
committerDries Buytaert <dries@buytaert.net>2009-08-22 13:25:37 +0000
commit0ac8abb27f52669e1375fea2e11389e58315bb61 (patch)
tree852950be7e0356fa128711dcdc961c814724f589 /modules
parent94abfae9ac9ecd62e2056824e59b59a47e5f5ba0 (diff)
downloadbrdo-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.module5
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();
}
}