You are here

function chr_admin_settings_form_submit in cURL HTTP Request 7

Submit callback

1 string reference to 'chr_admin_settings_form_submit'
chr_admin_settings_form in ./chr.admin.inc
Form settings array

File

./chr.admin.inc, line 40
Admin settings

Code

function chr_admin_settings_form_submit(&$form, &$form_state) {
  $values =& $form_state['values'];

  // Check if override is enabled
  if ($values['chr_override_drupal_http_request'] == TRUE) {
    variable_set('chr_original_http_request_function_value', variable_get('drupal_http_request_function', FALSE));
    variable_set('drupal_http_request_function', 'chr_curl_http_request');
  }
  else {

    // Restore original override
    variable_set('drupal_http_request_function', variable_get('chr_original_http_request_function_value', FALSE));
  }
}