function variable_realm_form_key_current in Variable 7
Same name and namespace in other branches
- 7.2 variable_realm/variable_realm.form.inc \variable_realm_form_key_current()
Get current realm key from query string.
3 calls to variable_realm_form_key_current()
- variable_realm_admin_realm_edit in variable_realm_admin/
variable_realm_admin.pages.inc - Edit variables for realm.
- variable_realm_union_variable_settings_form_alter in variable_realm_union/
variable_realm_union.variable.inc - Implements hook_variable_settings_form_alter().
- variable_realm_variable_settings_form_alter in variable_realm/
variable_realm.variable.inc - Implements hook_variable_settings_form_alter().
File
- variable_realm/
variable_realm.form.inc, line 158 - Administrative forms for variable realms.
Code
function variable_realm_form_key_current($realm_name, $default_key = NULL) {
if ($key = variable_realm_params($realm_name)) {
return $key;
}
elseif ($current_key = variable_realm_status($realm_name)) {
return $current_key;
}
elseif ($default_key) {
return $default_key;
}
else {
$realm_info = variable_realm_info($realm_name);
return $realm_info['default key'];
}
}