From: Donald A. Lobo Date: Thu, 18 Apr 2013 23:26:33 +0000 (-0700) Subject: CRM-12368 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=6d6c82531e1ed73c2ea84ef84162bfc85315b1ab;p=civicrm-core.git CRM-12368 ---------------------------------------- * CRM-12368: proximity search via advanced search broken http://issues.civicrm.org/jira/browse/CRM-12368 --- diff --git a/CRM/Contact/BAO/ProximityQuery.php b/CRM/Contact/BAO/ProximityQuery.php index 1cc25cd1b7..1340c5e91e 100644 --- a/CRM/Contact/BAO/ProximityQuery.php +++ b/CRM/Contact/BAO/ProximityQuery.php @@ -331,6 +331,8 @@ $earthDistanceSQL <= $distance CRM_Core_Error::fatal(ts('Proximity searching requires you to set a valid geocoding provider')); } + $query->_tables['civicrm_address'] = $query->_whereTables['civicrm_address'] = 1; + require_once (str_replace('_', DIRECTORY_SEPARATOR, $fnName) . '.php'); $fnName::format($proximityAddress); if ( @@ -345,7 +347,6 @@ $earthDistanceSQL <= $distance } $query->_qill[$grouping][] = $qill; - $query->_tables['civicrm_address'] = $query->_whereTables['civicrm_address'] = 1; $query->_where[$grouping][] = self::where( $proximityAddress['geo_code_1'], $proximityAddress['geo_code_2'],