diff --git a/core/includes/ajax.inc b/core/includes/ajax.inc index cda55b4..084c70d 100644 --- a/core/includes/ajax.inc +++ b/core/includes/ajax.inc @@ -407,7 +407,7 @@ function ajax_base_page_theme() { // to see the default theme, token validation isn't required for that, and // bypassing it allows most use-cases to work even when accessed from the // page cache. - if ($theme === variable_get('theme_default', 'bartik') || drupal_valid_token($token, $theme)) { + if ($theme === variable_get('theme_default', 'stark') || drupal_valid_token($token, $theme)) { return $theme; } } diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 5c38525..6b9da33 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -80,7 +80,7 @@ function drupal_theme_initialize() { // Only select the user selected theme if it is available in the // list of themes that can be accessed. - $theme = !empty($user->theme) && drupal_theme_access($user->theme) ? $user->theme : variable_get('theme_default', 'bartik'); + $theme = !empty($user->theme) && drupal_theme_access($user->theme) ? $user->theme : variable_get('theme_default', 'stark'); // Allow modules to override the theme. Validation has already been performed // inside menu_get_custom_theme(), so we do not need to check it again here. @@ -1429,7 +1429,7 @@ function theme_enable($theme_list) { */ function theme_disable($theme_list) { // Don't disable the default theme. - if ($pos = array_search(variable_get('theme_default', 'bartik'), $theme_list) !== FALSE) { + if ($pos = array_search(variable_get('theme_default', 'stark'), $theme_list) !== FALSE) { unset($theme_list[$pos]); if (empty($theme_list)) { return; diff --git a/core/modules/block/block.admin.inc b/core/modules/block/block.admin.inc index 7169190..5e58832 100644 --- a/core/modules/block/block.admin.inc +++ b/core/modules/block/block.admin.inc @@ -295,7 +295,7 @@ function block_admin_configure($form, &$form_state, $module, $delta) { '#tree' => TRUE, ); - $theme_default = variable_get('theme_default', 'bartik'); + $theme_default = variable_get('theme_default', 'stark'); $admin_theme = variable_get('admin_theme'); foreach (list_themes() as $key => $theme) { // Only display enabled themes diff --git a/core/modules/block/block.module b/core/modules/block/block.module index 920090f..e3987eb 100644 --- a/core/modules/block/block.module +++ b/core/modules/block/block.module @@ -63,7 +63,7 @@ function block_help($path, $arg) { return '

' . t('Use this page to create a new custom block.') . '

'; } if ($arg[0] == 'admin' && $arg[1] == 'structure' && $arg['2'] == 'block' && (empty($arg[3]) || $arg[3] == 'list')) { - $demo_theme = !empty($arg[4]) ? $arg[4] : variable_get('theme_default', 'bartik'); + $demo_theme = !empty($arg[4]) ? $arg[4] : variable_get('theme_default', 'stark'); $themes = list_themes(); $output = '

' . t('This page provides a drag-and-drop interface for assigning a block to a region, and for controlling the order of blocks within regions. Since not all themes implement the same regions, or display regions in the same way, blocks are positioned on a per-theme basis. Remember that your changes will not be saved until you click the Save blocks button at the bottom of the page. Click the configure link next to each block to configure its specific title and visibility settings.') . '

'; $output .= '

' . l(t('Demonstrate block regions (@theme)', array('@theme' => $themes[$demo_theme]->info['name'])), 'admin/structure/block/demo/' . $demo_theme) . '

'; @@ -103,7 +103,7 @@ function block_permission() { * Implements hook_menu(). */ function block_menu() { - $default_theme = variable_get('theme_default', 'bartik'); + $default_theme = variable_get('theme_default', 'stark'); $items['admin/structure/block'] = array( 'title' => 'Blocks', 'description' => 'Configure what block content appears in your site\'s sidebars and other regions.', @@ -294,7 +294,7 @@ function block_page_build(&$page) { $page['page_top']['backlink'] = array( '#type' => 'link', '#title' => t('Exit block region demonstration'), - '#href' => 'admin/structure/block' . (variable_get('theme_default', 'bartik') == $theme ? '' : '/list/' . $theme), + '#href' => 'admin/structure/block' . (variable_get('theme_default', 'stark') == $theme ? '' : '/list/' . $theme), // Add the "overlay-restore" class to indicate this link should restore // the context in which the region demonstration page was opened. '#options' => array('attributes' => array('class' => array('block-demo-backlink', 'overlay-restore'))), @@ -636,7 +636,7 @@ function block_theme_initialize($theme) { // Initialize theme's blocks if none already registered. $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'); + $default_theme = variable_get('theme_default', 'stark'); // 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)); diff --git a/core/modules/block/block.test b/core/modules/block/block.test index 0b41be5..5d3c15d 100644 --- a/core/modules/block/block.test +++ b/core/modules/block/block.test @@ -425,7 +425,7 @@ class NewDefaultThemeBlocks extends DrupalWebTestCase { // Ensure no other theme's blocks are in the block table yet. $themes = array(); - $themes['default'] = variable_get('theme_default', 'bartik'); + $themes['default'] = variable_get('theme_default', 'stark'); if ($admin_theme = variable_get('admin_theme')) { $themes['admin'] = $admin_theme; } diff --git a/core/modules/node/node.test b/core/modules/node/node.test index 817f390..991a766 100644 --- a/core/modules/node/node.test +++ b/core/modules/node/node.test @@ -1872,7 +1872,7 @@ class NodeBlockFunctionalTest extends DrupalWebTestCase { $custom_block['title'] = $this->randomName(); $custom_block['types[article]'] = TRUE; $custom_block['body[value]'] = $this->randomName(32); - $custom_block['regions[' . variable_get('theme_default', 'bartik') . ']'] = 'content'; + $custom_block['regions[' . variable_get('theme_default', 'stark') . ']'] = 'content'; if ($admin_theme = variable_get('admin_theme')) { $custom_block['regions[' . $admin_theme . ']'] = 'content'; } diff --git a/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc index a5a8885..bdc3342 100644 --- a/core/modules/system/system.admin.inc +++ b/core/modules/system/system.admin.inc @@ -130,7 +130,7 @@ function system_themes_page() { $themes = system_rebuild_theme_data(); uasort($themes, 'system_sort_modules_by_info_name'); - $theme_default = variable_get('theme_default', 'bartik'); + $theme_default = variable_get('theme_default', 'stark'); $theme_groups = array(); foreach ($themes as &$theme) { @@ -315,7 +315,7 @@ function system_theme_disable() { // Check if the specified theme is one recognized by the system. if (!empty($themes[$theme])) { - if ($theme == variable_get('theme_default', 'bartik')) { + if ($theme == variable_get('theme_default', 'stark')) { // Don't disable the default theme. drupal_set_message(t('%theme is the default theme and cannot be disabled.', array('%theme' => $themes[$theme]->info['name'])), 'error'); } diff --git a/core/modules/system/system.install b/core/modules/system/system.install index 6f81509..b8023a5 100644 --- a/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -499,11 +499,11 @@ function system_install() { system_rebuild_theme_data(); // Enable the default theme. - variable_set('theme_default', 'bartik'); + variable_set('theme_default', 'stark'); db_update('system') ->fields(array('status' => 1)) ->condition('type', 'theme') - ->condition('name', 'bartik') + ->condition('name', 'stark') ->execute(); // Populate the cron key variable. diff --git a/profiles/standard/standard.install b/profiles/standard/standard.install index 5d44717..4da5bcb 100644 --- a/profiles/standard/standard.install +++ b/profiles/standard/standard.install @@ -62,8 +62,22 @@ function standard_install() { $full_html_format = (object) $full_html_format; filter_format_save($full_html_format); + // Enable Bartik theme and set it as default theme instead of Stark. + // @see system_install() + $default_theme = 'bartik'; + variable_set('theme_default', $default_theme); + db_update('system') + ->fields(array('status' => 1)) + ->condition('type', 'theme') + ->condition('name', $default_theme) + ->execute(); + db_update('system') + ->fields(array('status' => 0)) + ->condition('type', 'theme') + ->condition('name', 'stark') + ->execute(); + // Enable some standard blocks. - $default_theme = variable_get('theme_default', 'bartik'); $admin_theme = 'seven'; $values = array( array(