diff --git a/modules/system/system.module b/modules/system/system.module index 52b95b3a8d9..cdf45128802 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -296,7 +296,7 @@ function system_menu($may_cache) { */ if (arg(0) == 'admin') { global $custom_theme; - $custom_theme = variable_get('admin_theme', 'bluemarine'); + $custom_theme = variable_get('admin_theme', '0'); drupal_add_css(drupal_get_path('module', 'system') .'/admin.css', 'core'); } @@ -417,7 +417,7 @@ function system_admin_theme_settings() { '#options' => $options, '#title' => t('Administration theme'), '#description' => t('Choose which theme the administration pages should display in. If you choose "System default" the administration pages theme will display in the same theme the rest of the site uses.'), - '#default_value' => variable_get('admin_theme', 'bluemarine'), + '#default_value' => variable_get('admin_theme', '0'), ); // In order to give it our own submit, we have to give it the default submit @@ -431,7 +431,7 @@ function system_admin_theme_settings() { function system_admin_theme_submit($form_id, $form_values) { // If we're changing themes, make sure the theme has its blocks initialized. - if ($form_values['admin_theme'] != variable_get('admin_theme', 'bluemarine')) { + if ($form_values['admin_theme'] != variable_get('admin_theme', '0')) { $result = db_query("SELECT status FROM {blocks} WHERE theme = '%s'", $form_values['admin_theme']); if (!db_num_rows($result)) { system_initialize_theme_blocks($form_values['admin_theme']); @@ -1215,6 +1215,13 @@ function system_themes_submit($form_id, $form_values) { } } } + if (($admin_theme = variable_get('admin_theme', '0')) != '0') { + drupal_set_message(t('Please note that the administration theme is still set to the %admin_theme theme; consequently, the theme on this page remains unchanged. All non-administrative sections of the site, however, will show the selected %selected_theme theme by default.', array( + '!admin_theme_page' => url('admin/settings/admin'), + '%admin_theme' => $admin_theme, + '%selected_theme' => $values['theme_default'], + ))); + } variable_set('theme_default', $form_values['theme_default']); } else {