From 6849336aa1567614eb37919796a0c01104b0ec01 Mon Sep 17 00:00:00 2001 From: Chris Burgess Date: Tue, 14 Jun 2016 15:51:51 +1200 Subject: [PATCH] CRM-18830. Restore Google API key for geocoding. Also, use SSL, do not push all the contact details over plain HTTP. --- CRM/Utils/Geocode/Google.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CRM/Utils/Geocode/Google.php b/CRM/Utils/Geocode/Google.php index 6d4186f53b..8621e2bd46 100644 --- a/CRM/Utils/Geocode/Google.php +++ b/CRM/Utils/Geocode/Google.php @@ -115,7 +115,11 @@ class CRM_Utils_Geocode_Google { $add .= '+' . urlencode(str_replace('', '+', $values['country'])); } - $query = 'http://' . self::$_server . self::$_uri . $add; + if (!empty($config->geoAPIKey)) { + $add .= '&key=' . urlencode($config->geoAPIKey); + } + + $query = 'https://' . self::$_server . self::$_uri . $add; require_once 'HTTP/Request.php'; $request = new HTTP_Request($query); -- 2.25.1