You are here

function google_appliance_admin_settings_submit in Google Search Appliance 5

Same name and namespace in other branches
  1. 6.2 google_appliance.module \google_appliance_admin_settings_submit()
  2. 7 google_appliance.admin.inc \google_appliance_admin_settings_submit()

Submits the admin settings form and saves all the variables.

File

./google_appliance.module, line 243
GSA integration

Code

function google_appliance_admin_settings_submit($form_id, $form) {
  variable_set('google_appliance_host_name', check_plain($form['google_appliance_host_name']));
  variable_set('google_appliance_collection', check_plain($form['google_appliance_collection']));
  variable_set('google_appliance_client', check_plain($form['google_appliance_client']));
  variable_set('google_appliance_name', check_plain($form['google_appliance_name']));
  variable_set('google_appliance_cache_timeout', check_plain($form['google_appliance_cache_timeout']));
  variable_set('google_debug', check_plain($form['google_debug']));
  variable_set('google_appliance_limit_per_page', check_plain($form['google_appliance_limit_per_page']));

  // don't run check_plain on these because they can have HTML
  variable_set('google_appliance_errorcode_1', $form['google_appliance_errorcode_1']);
  variable_set('google_appliance_errorcode_2', $form['google_appliance_errorcode_2']);
  variable_set('google_appliance_errorcode_neg_99', $form['google_appliance_errorcode_neg_99']);
  variable_set('google_appliance_errorcode_neg_100', $form['google_appliance_errorcode_neg_100']);
  drupal_set_message(t('Your settings have been saved.'));
}