update_settings_submit

Versions
6 – 7
update_settings_submit($form, $form_state)

Submit handler for the settings tab.

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 need 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).

Code

modules/update/update.settings.inc, line 100

<?php
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);
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.