X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FConfig%2FVariables.php;h=56d4e282c82018006f5d87373e3ba5bacdd47272;hb=0acb7f15552889bdba24b013da4dafebebf3a838;hp=2f4c1d482930678b373e6cd17cdd08a913915608;hpb=674cb8b854f6008090d4dcce9372ee76346a198f;p=civicrm-core.git diff --git a/CRM/Core/Config/Variables.php b/CRM/Core/Config/Variables.php index 2f4c1d4829..56d4e282c8 100644 --- a/CRM/Core/Config/Variables.php +++ b/CRM/Core/Config/Variables.php @@ -1,7 +1,7 @@ defaultCurrency || $defaultCurrency) { - $this->currencySymbols = CRM_Core_PseudoConstant::get('CRM_Contribute_DAO_Contribution', 'currency', array( - 'labelColumn' => 'symbol', - 'orderColumn' => TRUE, - )); - $currency = $defaultCurrency ? $defaultCurrency : $this->defaultCurrency; - $cachedSymbol = CRM_Utils_Array::value($currency, $this->currencySymbols, ''); - } - else { - $cachedSymbol = '$'; - } - } - return $cachedSymbol; - } - - /** - * Provide cached default currency symbol. - * - * @param - * - * @return string - */ - public function defaultContactCountry() { - static $cachedContactCountry = NULL; - - if (!empty($this->defaultContactCountry) && - !$cachedContactCountry - ) { - $countryIsoCodes = CRM_Core_PseudoConstant::countryIsoCode(); - $cachedContactCountry = CRM_Utils_Array::value($this->defaultContactCountry, - $countryIsoCodes - ); - } - return $cachedContactCountry; - } - - /** - * Provide cached default country name. - * - * @param - * - * @return string - */ - public function defaultContactCountryName() { - static $cachedContactCountryName = NULL; - if (!$cachedContactCountryName && $this->defaultContactCountry) { - $countryCodes = CRM_Core_PseudoConstant::country(); - $cachedContactCountryName = $countryCodes[$this->defaultContactCountry]; - } - return $cachedContactCountryName; - } - - /** - * Provide cached country limit translated to names. - * - * @param - * - * @return array - */ - public function countryLimit() { - static $cachedCountryLimit = NULL; - if (!$cachedCountryLimit) { - $countryIsoCodes = CRM_Core_PseudoConstant::countryIsoCode(); - $country = array(); - if (is_array($this->countryLimit)) { - foreach ($this->countryLimit as $val) { - // CRM-12007 - // some countries have disappeared and hence they might be in country limit - // but not in the country table - if (isset($countryIsoCodes[$val])) { - $country[] = $countryIsoCodes[$val]; - } - } - } - else { - $country[] = $countryIsoCodes[$this->countryLimit]; - } - $cachedCountryLimit = $country; - } - return $cachedCountryLimit; - } - - /** - * Provide cached province limit translated to names. - * - * @param - * - * @return array - */ - public function provinceLimit() { - static $cachedProvinceLimit = NULL; - if (!$cachedProvinceLimit) { - $countryIsoCodes = CRM_Core_PseudoConstant::countryIsoCode(); - $country = array(); - if (is_array($this->provinceLimit)) { - foreach ($this->provinceLimit as $val) { - // CRM-12007 - // some countries have disappeared and hence they might be in country limit - // but not in the country table - if (isset($countryIsoCodes[$val])) { - $country[] = $countryIsoCodes[$val]; - } - } - } - else { - $country[] = $countryIsoCodes[$this->provinceLimit]; - } - $cachedProvinceLimit = $country; - } - return $cachedProvinceLimit; - } + public $inheritLocale = 0; } // end CRM_Core_Config