X-Git-Url: https://git.openstreetmap.org/nominatim.git/blobdiff_plain/96b6a1a41892224b79fb99917981843aef6a4465..d72c8633531c859ebf20ed366f1d6976853ffe0d:/lib/Geocode.php diff --git a/lib/Geocode.php b/lib/Geocode.php index f65a485a..f3cc10da 100644 --- a/lib/Geocode.php +++ b/lib/Geocode.php @@ -411,7 +411,10 @@ class Geocode //$aPlaceIDs is an array with key: placeID and value: tiger-housenumber, if found, else -1 if (sizeof($aPlaceIDs) == 0) return array(); - $sLanguagePrefArraySQL = "ARRAY[".join(',', array_map("getDBQuoted", $this->aLangPrefOrder))."]"; + $sLanguagePrefArraySQL = getArraySQL( + array_map("getDBQuoted", + $this->aLangPrefOrder) + ); // Get the details for display (is this a redundant extra step?) $sPlaceIDs = join(',', array_keys($aPlaceIDs)); @@ -980,7 +983,10 @@ class Geocode if (!$this->sQuery && !$this->aStructuredQuery) return array(); $sNormQuery = $this->normTerm($this->sQuery); - $sLanguagePrefArraySQL = "ARRAY[".join(',', array_map("getDBQuoted", $this->aLangPrefOrder))."]"; + $sLanguagePrefArraySQL = getArraySQL( + array_map("getDBQuoted", + $this->aLangPrefOrder) + ); $sCountryCodesSQL = false; if ($this->aCountryCodes) { $sCountryCodesSQL = join(',', array_map('addQuotes', $this->aCountryCodes));