From 6d6c82531e1ed73c2ea84ef84162bfc85315b1ab Mon Sep 17 00:00:00 2001 From: "Donald A. Lobo" Date: Thu, 18 Apr 2013 16:26:33 -0700 Subject: [PATCH] CRM-12368 ---------------------------------------- * CRM-12368: proximity search via advanced search broken http://issues.civicrm.org/jira/browse/CRM-12368 --- CRM/Contact/BAO/ProximityQuery.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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'], -- 2.25.1