You are here

function location_geocoding_options_form_submit in Location 7.5

Same name and namespace in other branches
  1. 5.3 location.admin.inc \location_geocoding_options_form_submit()
  2. 5 location.module \location_geocoding_options_form_submit()
  3. 6.3 location.admin.inc \location_geocoding_options_form_submit()
  4. 7.3 location.admin.inc \location_geocoding_options_form_submit()
  5. 7.4 location.admin.inc \location_geocoding_options_form_submit()
1 string reference to 'location_geocoding_options_form_submit'
location_geocoding_options_form in ./location.admin.inc

File

./location.admin.inc, line 276
Admin forms for Location.

Code

function location_geocoding_options_form_submit($form, &$form_state) {
  $general_geocoders = location_get_general_geocoder_list();
  $general_geocoders_in_use = array();
  foreach ($form_state['values'] as $key => $value) {
    if (substr($key, 0, 17) == 'location_geocode_' && $key != 'location_geocode_google_minimum_accuracy') {
      if (in_array($value, $general_geocoders)) {
        $general_geocoders_in_use[$value] = $value;
        variable_set($key, $value);
      }
    }
  }
  variable_set('location_geocode_google_minimum_accuracy', $form_state['values']['location_geocode_google_minimum_accuracy']);
  variable_set('location_general_geocoders_in_use', $general_geocoders_in_use);
}