]> git.openstreetmap.org Git - nominatim.git/commitdiff
make sure names/extratags is enabled for postgres > 9.2 only
authorSarah Hoffmann <lonvia@denofr.de>
Mon, 10 Aug 2015 19:53:13 +0000 (21:53 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Mon, 10 Aug 2015 19:53:13 +0000 (21:53 +0200)
Support for hstore_to_json() needed.

lib/Geocode.php

index 93498c334c0990197104ad92808942358bc9cb64..8b94e54938cf6ccc5fc623e9752e83765e3de3d3 100644 (file)
                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'];