From c5d184af29468ad2f223e8c298d700e4086108e2 Mon Sep 17 00:00:00 2001 From: "Donald A. Lobo" Date: Sat, 13 Apr 2013 08:11:01 -0700 Subject: [PATCH] CRM-8963 ---------------------------------------- * CRM-8963: Batch update profile: states do not change with country http://issues.civicrm.org/jira/browse/CRM-8963 --- CRM/Core/BAO/Address.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/CRM/Core/BAO/Address.php b/CRM/Core/BAO/Address.php index a3bf099b0d..b12a481c65 100644 --- a/CRM/Core/BAO/Address.php +++ b/CRM/Core/BAO/Address.php @@ -665,8 +665,14 @@ ORDER BY civicrm_address.is_primary DESC, civicrm_address.location_type_id DESC, static function fixAllStateSelects(&$form, $defaults, $batchFieldNames = false) { $config = CRM_Core_Config::singleton(); - - $map = is_array($batchFieldNames) ? $batchFieldNames : $config->stateCountryMap; + + $map = null; + if (is_array($batchFieldNames)) { + $map = $batchFieldNames; + } + else if (!empty($config->stateCountryMap)) { + $map = $config->stateCountryMap; + } if (!empty($map)) { foreach ($map as $index => $match) { -- 2.25.1