function update_settings_submit

Same name and namespace in other branches
  1. 6.x drupal-6.x/modules/update/update.settings.inc \update_settings_submit()

Form submission handler for update_settings().

Also invalidates the cache of available updates if the "Check for updates of disabled modules and themes" setting is being changed. The available updates report needs to refetch available update data after this setting changes or it would show misleading things (e.g., listing the disabled projects on the site with the "No available releases found" warning).

See also

update_settings_validate()

Archivo

drupal-7.x/modules/update/update.settings.inc, line 108
Code required only for the update status settings form.

Código

function update_settings_submit($form, $form_state) {
  $op = $form_state['values']['op'];

  if (empty($form_state['notify_emails'])) {
    variable_del('update_notify_emails');
  }
  else {
    variable_set('update_notify_emails', $form_state['notify_emails']);
  }
  unset($form_state['notify_emails']);
  unset($form_state['values']['update_notify_emails']);

  // See if the update_check_disabled setting is being changed, and if so,
  // invalidate all cached update status data.
  $check_disabled = variable_get('update_check_disabled', FALSE);
  if ($form_state['values']['update_check_disabled'] != $check_disabled) {
    _update_cache_clear();
  }

  system_settings_form_submit($form, $form_state);
}