public function OgVariableStoreRealmStore::variable_get in OG Variables 7
Default to global to get around form fields default to hard default.
Overrides VariableRealmDefaultStore::variable_get
File
- ./
og_variables.class.inc, line 67 - Variable Realm controller.
Class
- OgVariableStoreRealmStore
- @file Variable realm controller
Code
public function variable_get($name, $default = NULL) {
$this
->variable_init();
// This gets around the hiccup that $conf has the old value right after
// delete os variable_realm_refresh resets it to that old value.
$was_deleted = FALSE;
if (!empty($this->deleted[$name])) {
$was_deleted = TRUE;
unset($this->deleted[$name]);
}
return isset($this->variables[$name]) ? $this->variables[$name] : (isset($this->parent_variables[$name]) ? $this->parent_variables[$name] : ($was_deleted ? $default : variable_get($name, $default)));
}