You are here

function system_admin_theme_submit in Drupal 6

Same name and namespace in other branches
  1. 5 modules/system/system.module \system_admin_theme_submit()

Process admin theme form submissions.

1 string reference to 'system_admin_theme_submit'
system_admin_theme_settings in modules/system/system.admin.inc
Form builder; This function allows selection of the theme to show in administration sections.

File

modules/system/system.module, line 654
Configuration system that lets administrators modify the workings of the site.

Code

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 {blocks} WHERE theme = '%s'", $form_state['values']['admin_theme']));
    if (!$result) {
      system_initialize_theme_blocks($form_state['values']['admin_theme']);
    }
  }
}