From: Donald A. Lobo Date: Sat, 13 Apr 2013 15:11:01 +0000 (-0700) Subject: CRM-8963 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=c5d184af29468ad2f223e8c298d700e4086108e2;p=civicrm-core.git CRM-8963 ---------------------------------------- * CRM-8963: Batch update profile: states do not change with country http://issues.civicrm.org/jira/browse/CRM-8963 --- 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) {