? includes/database/install.inc ? sites/all/modules/cvs Index: modules/system/system.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.admin.inc,v retrieving revision 1.124 diff -u -p -r1.124 system.admin.inc --- modules/system/system.admin.inc 3 Feb 2009 18:55:31 -0000 1.124 +++ modules/system/system.admin.inc 9 Feb 2009 01:50:38 -0000 @@ -133,51 +133,14 @@ function system_settings_overview() { } /** - * Form builder; This function allows selection of the theme to show in administration sections. - * - * @ingroup forms - * @see system_settings_form() - */ -function system_admin_theme_settings() { - $themes = system_theme_data(); - - uasort($themes, 'system_sort_modules_by_info_name'); - - $options[0] = '<' . t('System default') . '>'; - foreach ($themes as $theme) { - $options[$theme->name] = $theme->info['name']; - } - - $form['admin_theme'] = array( - '#type' => 'select', - '#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 will use the same theme as the rest of the site.'), - '#default_value' => '0', - ); - - $form['node_admin_theme'] = array( - '#type' => 'checkbox', - '#title' => t('Use administration theme for content editing'), - '#description' => t('Use the administration theme when editing existing posts or creating new ones.'), - '#default_value' => '0', - ); - - $form['#submit'][] = 'system_admin_theme_submit'; - return system_settings_form($form, TRUE); -} - -/** * Menu callback; displays a listing of all themes. * * @ingroup forms * @see system_themes_form_submit() */ function system_themes_form() { - drupal_clear_css_cache(); $themes = system_theme_data(); - uasort($themes, 'system_sort_modules_by_info_name'); $status = array(); @@ -236,6 +199,11 @@ function system_themes_form() { '#options' => $options, '#default_value' => variable_get('theme_default', 'garland'), ); + $form['admin_theme'] = array( + '#type' => 'radios', + '#options' => $options, + '#default_value' => variable_get('admin_theme', 'garland') ? variable_get('admin_theme', 'garland') : variable_get('theme_default', 'garland'), + ); $form['buttons']['submit'] = array( '#type' => 'submit', '#value' => t('Save configuration'), @@ -280,6 +248,7 @@ function system_themes_form_submit($form ))); } variable_set('theme_default', $form_state['values']['theme_default']); + variable_set('admin_theme', $form_state['values']['admin_theme']); } else { // Revert to defaults: only Garland is enabled. @@ -2249,12 +2218,13 @@ function theme_system_themes_form($form) $row[] = array('data' => $status, 'align' => 'center'); if ($form['theme_default']) { $row[] = array('data' => drupal_render($form['theme_default'][$key]), 'align' => 'center'); + $row[] = array('data' => drupal_render($form['admin_theme'][$key]), 'align' => 'center'); $row[] = array('data' => drupal_render($form[$key]['operations']), 'align' => 'center'); } $rows[] = $row; } - $header = array(t('Screenshot'), t('Name'), t('Version'), t('Enabled'), t('Default'), t('Operations')); + $header = array(t('Screenshot'), t('Name'), t('Version'), t('Enabled'), t('Default'), t('Admin'), t('Operations')); $output = theme('table', $header, $rows); $output .= drupal_render_children($form); return $output; Index: modules/system/system.module =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.module,v retrieving revision 1.666 diff -u -p -r1.666 system.module --- modules/system/system.module 3 Feb 2009 18:55:31 -0000 1.666 +++ modules/system/system.module 9 Feb 2009 01:50:40 -0000 @@ -504,15 +504,6 @@ function system_menu() { 'page callback' => 'system_admin_menu_block_page', 'access arguments' => array('access administration pages'), ); - $items['admin/settings/admin'] = array( - 'title' => 'Administration theme', - 'description' => 'Settings for how your administrative pages should look.', - 'position' => 'left', - 'page callback' => 'drupal_get_form', - 'page arguments' => array('system_admin_theme_settings'), - 'access arguments' => array('administer site configuration'), - 'block callback' => 'system_admin_theme_settings', - ); // Themes: $items['admin/build/themes'] = array( 'title' => 'Themes', @@ -982,19 +973,6 @@ function system_admin_menu_block($item) } /** - * Process admin theme form submissions. - */ -function system_admin_theme_submit($form, &$form_state) { - // If we're changing themes, make sure the theme has its blocks initialized. - if ($form_state['values']['admin_theme'] && $form_state['values']['admin_theme'] != variable_get('admin_theme', '0')) { - $result = db_result(db_query("SELECT COUNT(*) FROM {block} WHERE theme = '%s'", $form_state['values']['admin_theme'])); - if (!$result) { - system_initialize_theme_blocks($form_state['values']['admin_theme']); - } - } -} - -/** * Returns a fieldset containing the theme select form. * * @param $description