You are here

function patchinfo_update_settings_form_submit in PatchInfo 7

Same name and namespace in other branches
  1. 8.2 patchinfo.module \patchinfo_update_settings_form_submit()
  2. 8 patchinfo.module \patchinfo_update_settings_form_submit()

Submission handler for extended update settings form.

Parameters

array $form: Drupal Form API form information.

array $form_state: Drupal Form API form state information.

1 string reference to 'patchinfo_update_settings_form_submit'
patchinfo_form_update_settings_alter in ./patchinfo.module
Implements hook_form_FORM_ID_alter() for update_settings().

File

./patchinfo.module, line 104
Patch Info primary module file.

Code

function patchinfo_update_settings_form_submit(array $form, array &$form_state) {

  // Get value of exclude update setting from form state and save it
  // into a variable.
  $exclude_modules = $form_state['values']['patchinfo_exclude_from_update_check'];
  $exclude_modules = explode("\n", $exclude_modules);
  foreach ($exclude_modules as $k => $e) {
    $e = trim($e);
    if (!empty($e)) {
      $exclude_modules[$k] = $e;
    }
    else {
      unset($exclude_modules[$k]);
    }
  }
  variable_set('patchinfo_exclude_from_update_check', $exclude_modules);
}