Skip to content

Commit

Permalink
Do not geocode while merging, rely on existing values
Browse files Browse the repository at this point in the history
This is a performance fix when merging - on a batch merge job it can be kinda crazy & we already have
geocode data for the contacts
  • Loading branch information
eileenmcnaughton authored and magnolia61 committed Oct 13, 2019
1 parent 8e90295 commit 009606e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CRM/Dedupe/Merger.php
Original file line number Diff line number Diff line change
Expand Up @@ -1191,7 +1191,11 @@ public static function getRowsElementsAndInfo($mainId, $otherId, $checkPermissio
$locations[$moniker][$blockName][$cnt] = $value;
// Fix address display
if ($blockName == 'address') {
// For performance avoid geocoding while merging https://issues.civicrm.org/jira/browse/CRM-21786
// we can expect existing geocode values to be retained.
$value['skip_geocode'] = TRUE;
CRM_Core_BAO_Address::fixAddress($value);
unset($value['skip_geocode']);
$locations[$moniker][$blockName][$cnt]['display'] = CRM_Utils_Address::format($value);
}
// Fix email display
Expand Down

0 comments on commit 009606e

Please sign in to comment.