update_settings_submit

function update_settings_submit

update_settings_submit($form, $form_state)

Form submission handler for update_settings().

Also invalidates the cache of available updates if the "Check for updates of disabled and uninstalled 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()

File

modules/update/update.settings.inc, line 109
Code required only for the update status settings form.

Code

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);
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!update!update.settings.inc/function/update_settings_submit/7.x

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部