Skip to content

Commit

Permalink
Merge pull request civicrm#9839 from fuzionnz/CRM-20023-geocode_state…
Browse files Browse the repository at this point in the history
…_province_id

CRM-20023: Do not require state_province value to use state_province_id value.
  • Loading branch information
eileenmcnaughton authored Mar 9, 2017
2 parents 47e83de + d82f9c0 commit be424fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CRM/Utils/Geocode/Google.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public static function format(&$values, $stateName = FALSE) {
$add .= ',+';
}

if (!empty($values['state_province'])) {
if (!empty($values['state_province']) || !empty($values['state_province_id'])) {
if (!empty($values['state_province_id'])) {
$stateProvince = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_StateProvince', $values['state_province_id']);
}
Expand Down
2 changes: 1 addition & 1 deletion CRM/Utils/Geocode/Yahoo.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public static function format(&$values, $stateName = FALSE) {
$whereComponents['city'] = $city;
}

if (!empty($values['state_province'])) {
if (!empty($values['state_province']) || !empty($values['state_province_id'])) {
if (!empty($values['state_province_id'])) {
$stateProvince = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_StateProvince', $values['state_province_id']);
}
Expand Down

0 comments on commit be424fd

Please sign in to comment.