summaryrefslogtreecommitdiff
path: root/modules/system/system.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/system/system.module')
-rw-r--r--modules/system/system.module28
1 files changed, 0 insertions, 28 deletions
diff --git a/modules/system/system.module b/modules/system/system.module
index d40d4934c..e0ac65c9f 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -1329,34 +1329,6 @@ function system_default_region($theme) {
return isset($regions[0]) ? $regions[0] : '';
}
-/**
- * Assign an initial, default set of blocks for a theme.
- *
- * This function is called the first time a new theme is enabled. The new theme
- * gets a copy of the default theme's blocks, with the difference that if a
- * particular region isn't available in the new theme, the block is assigned
- * to the new theme's default region.
- *
- * @param $theme
- * The name of a theme.
- */
-function system_initialize_theme_blocks($theme) {
- // Initialize theme's blocks if none already registered.
- if (!(db_result(db_query("SELECT COUNT(*) FROM {block} WHERE theme = '%s'", $theme)))) {
- $default_theme = variable_get('theme_default', 'garland');
- $regions = system_region_list($theme);
- $result = db_query("SELECT * FROM {block} WHERE theme = '%s'", $default_theme);
- while ($block = db_fetch_array($result)) {
- // 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);
- }
- db_query("INSERT INTO {block} (module, delta, theme, status, weight, region, visibility, pages, custom, cache) VALUES ('%s', '%s', '%s', %d, %d, '%s', %d, '%s', %d, %d)",
- $block['module'], $block['delta'], $theme, $block['status'], $block['weight'], $block['region'], $block['visibility'], $block['pages'], $block['custom'], $block['cache']);
- }
- }
-}
-
function _system_settings_form_automatic_defaults($form) {
// Get an array of all non-property keys
$keys = element_children($form);