X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FBAO%2FSetting.php;h=c8cfb25d2960284b88408e814f5235e18cdeee80;hb=58f6c2724c86e952cf12b49d77389a8abd37e50d;hp=3fbe429608726c9ff2b5625f2bda0e7f6aa59292;hpb=bf83df95d6c292576a3283e14ccaa0207d0b05ce;p=civicrm-core.git diff --git a/CRM/Core/BAO/Setting.php b/CRM/Core/BAO/Setting.php index 3fbe429608..c8cfb25d29 100644 --- a/CRM/Core/BAO/Setting.php +++ b/CRM/Core/BAO/Setting.php @@ -230,7 +230,7 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting { $override_group = array(); if (NULL !== ($override = self::getOverride($group, $name, NULL))) { - if ( isset($name) ) { + if (isset($name)) { return $override; } else { @@ -243,10 +243,10 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting { } $cacheKey = self::inCache($group, $name, $componentID, $contactID, TRUE, $domainID); - if ( $group && !isset($name) && $cacheKey) { + if ($group && !isset($name) && $cacheKey) { // check value against the cache, and unset key if values are different - $valueDifference = array_diff($override_group, self::$_cache[$cacheKey] ); - if ( !empty($valueDifference)) { + $valueDifference = array_diff($override_group, self::$_cache[$cacheKey]); + if (!empty($valueDifference)) { $cacheKey = ''; } } @@ -269,13 +269,13 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting { } $dao->free(); - if ( ! isset($name) ) { + if (!isset($name)) { // merge db and override group values - /* When no $name is present, the getItem() function should return an array - consisting of the sum of all override settings + all settings present in - the database for the given $group (with the overrides taking precedence, - and applying even if the setting is not defined in the database). - */ + // When no $name is present, the getItem() function should return an array + // consisting of the sum of all override settings + all settings present in + // the database for the given $group (with the overrides taking precedence, + // and applying even if the setting is not defined in the database). + // $values = array_merge($values, $override_group); } @@ -1126,7 +1126,7 @@ AND domain_id = %3 if ($group && $name && isset($civicrm_setting[$group][$name])) { return $civicrm_setting[$group][$name]; } - else if ($group && !isset($name) && isset($civicrm_setting[$group])) { + elseif ($group && !isset($name) && isset($civicrm_setting[$group])) { return $civicrm_setting[$group]; } else {