From: Sarah Hoffmann Date: Mon, 10 Aug 2015 19:53:13 +0000 (+0200) Subject: make sure names/extratags is enabled for postgres > 9.2 only X-Git-Tag: v.2.5.0~35^2~1 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/95a681f1280accf7c5c4f4cf0e04a7206088c381 make sure names/extratags is enabled for postgres > 9.2 only Support for hstore_to_json() needed. --- 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'];