You are here

function suggestion_admin_settings_form_submit in Autocomplete Search Suggestions 7

Custom submit function for the suggestion setting form.

1 string reference to 'suggestion_admin_settings_form_submit'
suggestion_admin_settings_form in ./suggestion.admin.inc
Menu callback to configure suggestion settings.

File

./suggestion.admin.inc, line 390
Administration form for suggestion module.

Code

function suggestion_admin_settings_form_submit($form, &$state) {
  if ($state['values']['suggestion_atoms_max'] != variable_get('suggestion_atoms_max', 0)) {
    variable_set('suggestion_synced', FALSE);
  }
  if ($state['values']['suggestion_atoms_min'] != variable_get('suggestion_atoms_min', 0)) {
    variable_set('suggestion_synced', FALSE);
  }
  elseif ($state['values']['suggestion_limit'] != variable_get('suggestion_limit', 0)) {
    variable_set('suggestion_synced', FALSE);
  }
  elseif ($state['values']['suggestion_max'] != variable_get('suggestion_max', 0)) {
    variable_set('suggestion_synced', FALSE);
  }
  elseif ($state['values']['suggestion_min'] != variable_get('suggestion_min', 0)) {
    variable_set('suggestion_synced', FALSE);
  }
  elseif ($state['values']['suggestion_types'] != variable_get('suggestion_types', NULL)) {
    variable_set('suggestion_synced', FALSE);
  }
  _suggestion_admin_submit_autocomplete($state);
  _suggestion_admin_submit_keywords($state);
  _suggestion_admin_submit_stopwords($state);
}