You are here

function system_theme_settings_submit in Drupal 5

Same name and namespace in other branches
  1. 4 modules/system.module \system_theme_settings_submit()
  2. 6 modules/system/system.admin.inc \system_theme_settings_submit()
  3. 7 modules/system/system.admin.inc \system_theme_settings_submit()

File

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

Code

function system_theme_settings_submit($form_id, $form_values) {
  $op = isset($_POST['op']) ? $_POST['op'] : '';
  $key = $form_values['var'];

  // Exclude unnecessary elements.
  unset($form_values['var'], $form_values['submit'], $form_values['reset'], $form_values['form_id']);
  if ($op == t('Reset to defaults')) {
    variable_del($key);
    drupal_set_message(t('The configuration options have been reset to their default values.'));
  }
  else {
    variable_set($key, $form_values);
    drupal_set_message(t('The configuration options have been saved.'));
  }
  cache_clear_all();
}