You are here

function getlocations_gps_settings_validate in Get Locations 7.2

Same name and namespace in other branches
  1. 7 modules/getlocations_gps/getlocations_gps.module \getlocations_gps_settings_validate()

Admin settings form validation.

1 string reference to 'getlocations_gps_settings_validate'
getlocations_gps_settings_form in modules/getlocations_gps/getlocations_gps.module
Function to display the getlocations_gps admin settings form

File

modules/getlocations_gps/getlocations_gps.module, line 163
getlocations_gps.module @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL

Code

function getlocations_gps_settings_validate($form, &$form_state) {
  $reset = $form_state['values']['getlocations_gps_paths']['reset'];
  unset($form_state['values']['getlocations_gps_paths']['reset']);
  if ($reset == 1) {
    $form_state['values']['getlocations_gps_paths'] = getlocations_gps_paths_get(TRUE);
  }
  elseif ($reset == 2) {
    $form_state['values']['getlocations_gps_paths'] = getlocations_gps_paths_get(FALSE, TRUE);
  }
}