From 95a681f1280accf7c5c4f4cf0e04a7206088c381 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Mon, 10 Aug 2015 21:53:13 +0200 Subject: [PATCH] make sure names/extratags is enabled for postgres > 9.2 only Support for hstore_to_json() needed. --- lib/Geocode.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/Geocode.php b/lib/Geocode.php index 93498c33..8b94e549 100644 --- a/lib/Geocode.php +++ b/lib/Geocode.php @@ -226,8 +226,11 @@ function loadParamArray($aParams) { if (isset($aParams['addressdetails'])) $this->bIncludeAddressDetails = (bool)$aParams['addressdetails']; - if (isset($aParams['extratags'])) $this->bIncludeExtraTags = (bool)$aParams['extratags']; - if (isset($aParams['namedetails'])) $this->bIncludeNameDetails = (bool)$aParams['namedetails']; + if ((float) CONST_Postgresql_Version > 9.2) + { + if (isset($aParams['extratags'])) $this->bIncludeExtraTags = (bool)$aParams['extratags']; + if (isset($aParams['namedetails'])) $this->bIncludeNameDetails = (bool)$aParams['namedetails']; + } if (isset($aParams['bounded'])) $this->bBoundedSearch = (bool)$aParams['bounded']; if (isset($aParams['dedupe'])) $this->bDeDupe = (bool)$aParams['dedupe']; -- 2.39.5