function lockr_admin_advanced_submit in Lockr 7.2
Same name and namespace in other branches
- 7 include/advanced_form.inc \lockr_admin_advanced_submit()
Save advanced settings.
1 string reference to 'lockr_admin_advanced_submit'
- lockr_admin_advanced_form in include/
advanced_form.inc - Returns form array for advanced settings.
File
- include/
advanced_form.inc, line 96 - Form handlers for advanced admin settings.
Code
function lockr_admin_advanced_submit($form, &$form_state) {
$values = $form_state['values'];
variable_set('lockr_region', $values['region']);
$custom = $values['custom'];
$cert_path = $values['custom_cert'];
if (!preg_match('/^(\\/|.+:\\/\\/)/', $cert_path)) {
$cert_path = DRUPAL_ROOT . "/{$cert_path}";
}
variable_set('lockr_custom', $custom);
if ($custom) {
variable_set('lockr_cert', $cert_path);
}
else {
variable_del('lockr_cert');
}
}