You are here

function system_theme_settings_submit in Drupal 4

Same name and namespace in other branches
  1. 5 modules/system/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.module, line 757
Configuration system that lets administrators modify the workings of the site.

Code

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

  // Exclude unnecessary elements.
  unset($values['var'], $values['submit'], $values['reset'], $values['form_id'], $values['op'], $values['form_token']);
  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, $values);
    drupal_set_message(t('The configuration options have been saved.'));
  }
}