function globallink_adaptor_settings_submit in GlobalLink Connect for Drupal 7.6
Same name and namespace in other branches
- 7.7 globallink_settings.inc \globallink_adaptor_settings_submit()
- 7.5 globallink_settings.inc \globallink_adaptor_settings_submit()
Submits adaptor settings.
File
- ./
globallink_settings.inc, line 398
Code
function globallink_adaptor_settings_submit($form, &$form_state) {
$old_preview = variable_get('globallink_enable_preview', 1);
$op = isset($form_state['values']['op']) ? $form_state['values']['op'] : '';
if ($op == t('Save Adaptor Settings')) {
foreach ($form_state['values'] as $key => $value) {
if (is_array($value) && isset($form_state['values']['array_filter'])) {
$value = array_keys(array_filter($value));
}
variable_set($key, $value);
}
$pvalue = $form_state['values']['globallink_enable_preview'];
if ($pvalue != $old_preview) {
$_SESSION['globallink_globalLink_arr'] = array();
unset($_SESSION['globallink_globalLink_arr_last_refreshed']);
}
}
drupal_set_message(t('The configuration options have been saved.'));
}