diff --git a/CRM/Core/BAO/Address.php b/CRM/Core/BAO/Address.php index 71ebf132db34..9c40a315d6a1 100644 --- a/CRM/Core/BAO/Address.php +++ b/CRM/Core/BAO/Address.php @@ -416,9 +416,9 @@ public static function dataExists(&$params) { if (substr($name, 0, 7) == 'country') { // make sure its different from the default country // iso code - $defaultCountry = $config->defaultContactCountry(); + $defaultCountry = CRM_Core_BAO_Country::defaultContactCountry(); // full name - $defaultCountryName = $config->defaultContactCountryName(); + $defaultCountryName = CRM_Core_BAO_Country::defaultContactCountryName(); if ($defaultCountry) { if ($value == $defaultCountry || diff --git a/CRM/Core/BAO/CustomField.php b/CRM/Core/BAO/CustomField.php index 07530e3f5228..26907960b856 100644 --- a/CRM/Core/BAO/CustomField.php +++ b/CRM/Core/BAO/CustomField.php @@ -1261,7 +1261,7 @@ public static function setProfileDefaults( if (!$value) { $config = CRM_Core_Config::singleton(); if ($config->defaultContactCountry) { - $value = $config->defaultContactCountry(); + $value = CRM_Core_BAO_Country::defaultContactCountry(); } } } diff --git a/CRM/Core/Config.php b/CRM/Core/Config.php index 4e3679fb6d4d..9e723ddaf43b 100644 --- a/CRM/Core/Config.php +++ b/CRM/Core/Config.php @@ -478,6 +478,7 @@ public function addressSequence() { * @deprecated */ public function defaultContactCountry() { + CRM_Core_Error::deprecatedFunctionWarning('CRM_Core_BAO_Country::defaultContactCountry'); return CRM_Core_BAO_Country::defaultContactCountry(); } @@ -485,6 +486,7 @@ public function defaultContactCountry() { * @deprecated */ public function defaultContactCountryName() { + CRM_Core_Error::deprecatedFunctionWarning('CRM_Core_BAO_Country::defaultContactCountryName'); return CRM_Core_BAO_Country::defaultContactCountryName(); } diff --git a/CRM/Core/PseudoConstant.php b/CRM/Core/PseudoConstant.php index c53c451d2d37..14e2e7fcf220 100644 --- a/CRM/Core/PseudoConstant.php +++ b/CRM/Core/PseudoConstant.php @@ -836,9 +836,9 @@ public static function country($id = FALSE, $applyLimit = TRUE) { self::populate(self::$country, 'CRM_Core_DAO_Country', TRUE, 'name', 'is_active', $whereClause); // if default country is set, percolate it to the top - if ($config->defaultContactCountry()) { + if (CRM_Core_BAO_Country::defaultContactCountry()) { $countryIsoCodes = self::countryIsoCode(); - $defaultID = array_search($config->defaultContactCountry(), $countryIsoCodes); + $defaultID = array_search(CRM_Core_BAO_Country::defaultContactCountry(), $countryIsoCodes); if ($defaultID !== FALSE) { $default[$defaultID] = CRM_Utils_Array::value($defaultID, self::$country); self::$country = $default + self::$country; diff --git a/CRM/Event/Cart/Form/Checkout/Payment.php b/CRM/Event/Cart/Form/Checkout/Payment.php index b5b6b6fef0c2..ece09d61d1ea 100644 --- a/CRM/Event/Cart/Form/Checkout/Payment.php +++ b/CRM/Event/Cart/Form/Checkout/Payment.php @@ -714,7 +714,7 @@ public function setDefaultValues() { $config = CRM_Core_Config::singleton(); $default_country = new CRM_Core_DAO_Country(); - $default_country->iso_code = $config->defaultContactCountry(); + $default_country->iso_code = CRM_Core_BAO_Country::defaultContactCountry(); $default_country->find(TRUE); $defaults["billing_country_id-{$this->_bltID}"] = $default_country->id;