}
$stateClause = "civicrm_address.state_province_id $op (" . implode(',', $value) . ')';
- $stateProvince = CRM_Core_PseudoConstant::stateProvince();
foreach ($value as $id) {
- $names[] = CRM_Utils_Array::value($id, $stateProvince);
+ $names[] = CRM_Core_PseudoConstant::stateProvince($id, FALSE);
}
}
else {
$parseStreetAddress = CRM_Utils_Array::value('street_address_parsing', $addressOptions, 0);
$form->assign('parseStreetAddress', $parseStreetAddress);
+ $stateCountryMap = NULL;
foreach ($elements as $name => $v) {
list($title, $attributes, $select, $multiSelect) = $v;
}
if ($select) {
- $stateCountryMap[] = array(
+ $stateCountryMap = array(array(
'state_province' => 'state_province',
'country' => 'country',
'county' => 'county',
- );
+ ));
if ($select == 'stateProvince') {
if (!empty($formValues['country'])) {
$selectElements = array('' => ts('- select -')) + CRM_Core_PseudoConstant::stateProvinceForCountry($formValues['country']);
* @param $stateCountryMap
* @param null $defaults
*/
- static function addStateCountryMap(&$stateCountryMap, $defaults = NULL) {
+ static function addStateCountryMap($stateCountryMap, $defaults = NULL) {
// first fix the statecountry map if needed
if (empty($stateCountryMap)) {
return;