You are here

function _key_provider_variable_overridden in Key 7

Helper function to determine if a variable is overridden.

Parameters

$variable_name: The variable to be tested.

Return value

bool A flag indicating whether the variable is overridden.

File

plugins/key_provider/variable.inc, line 113
Plugin definition for the Variable key provider.

Code

function _key_provider_variable_overridden($variable_name) {
  $variable_overridden = FALSE;
  $key = variable_get($variable_name, '');
  variable_del($variable_name);
  if (variable_get($variable_name, '')) {
    $variable_overridden = TRUE;
  }
  else {
    variable_set($variable_name, $key);
  }
  return $variable_overridden;
}