You are here

function update_advanced_settings_submit in Update Status Advanced Settings 6

Same name and namespace in other branches
  1. 7 update_advanced.settings.inc \update_advanced_settings_submit()

Submit handler for the update status settings tab.

Ensures that the temporary form data required for the theme function is not actually saved into the {variables} table, then invokes the true submit handler for the settings form to save or reset all the values.

Also invalidates the cache of available updates if the "Check for updates of disabled modules and themes" setting is being changed. Both the advanced settings table and the available updates report need to refetch available update data after this setting changes or they're going to show misleading things (for example, listing all of the disabled projects on the site with the "No available releases found" warning).

1 string reference to 'update_advanced_settings_submit'
_update_advanced_alter_settings in ./update_advanced.settings.inc
Alters the update_settings form to add advanced, per-project settings.

File

./update_advanced.settings.inc, line 166
Code only required on the settings tab of the update status page.

Code

function update_advanced_settings_submit($form, &$form_state) {
  unset($form_state['values']['data']);
  unset($form_state['values']['available']);

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