X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/cf39e07dba72373302e2d1a48de3083339d0decb..7523359aba2814bd143ccb0f18d20b54b611c7eb:/utils/query.php diff --git a/utils/query.php b/utils/query.php old mode 100755 new mode 100644 index 05875d64..9694bbb9 --- a/utils/query.php +++ b/utils/query.php @@ -1,7 +1,5 @@ -#!/usr/bin/php -Cq getBool('search')) { if (isset($aCMDResult['nodedupe'])) $aCMDResult['dedupe'] = 'false'; - $oGeocode = new Geocode($oDB); + $oGeocode = new Nominatim\Geocode($oDB); $oGeocode->setLanguagePreference($oParams->getPreferredLanguages(false)); $oGeocode->loadParamArray($oParams); @@ -41,11 +39,7 @@ if ($oParams->getBool('search')) { $aSearchResults = $oGeocode->lookup(); - if (version_compare(phpversion(), "5.4.0", '<')) { - echo json_encode($aSearchResults); - } else { - echo json_encode($aSearchResults, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE)."\n"; - } + echo json_encode($aSearchResults, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE)."\n"; } else { showUsage($aCMDOptions, true); }