X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/63755c31ff07ce193cb0bb4f7af20a46fdfc363a..500c61685b16fd1d51e7b5f4738c788a9d00eab4:/lib-php/Geocode.php diff --git a/lib-php/Geocode.php b/lib-php/Geocode.php index a3883b25..ccb8a810 100644 --- a/lib-php/Geocode.php +++ b/lib-php/Geocode.php @@ -417,7 +417,7 @@ class Geocode $iSearchCount = 0; $aSearches = array(); - foreach ($aGroupedSearches as $iScore => $aNewSearches) { + foreach ($aGroupedSearches as $aNewSearches) { $iSearchCount += count($aNewSearches); $aSearches = array_merge($aSearches, $aNewSearches); if ($iSearchCount > 50) break; @@ -503,10 +503,6 @@ class Geocode Debug::newSection('Query Preprocessing'); - $sLanguagePrefArraySQL = $this->oDB->getArraySQL( - $this->oDB->getDBQuotedList($this->aLangPrefOrder) - ); - $sQuery = $this->sQuery; if (!preg_match('//u', $sQuery)) { userError('Query string is not UTF-8 encoded.'); @@ -891,15 +887,8 @@ class Geocode $aToFilter = $aSearchResults; $aSearchResults = array(); - $bFirst = true; foreach ($aToFilter as $aResult) { $this->aExcludePlaceIDs[$aResult['place_id']] = $aResult['place_id']; - if ($bFirst) { - $fLat = $aResult['lat']; - $fLon = $aResult['lon']; - if (isset($aResult['zoom'])) $iZoom = $aResult['zoom']; - $bFirst = false; - } if (!$this->oPlaceLookup->doDeDupe() || (!isset($aOSMIDDone[$aResult['osm_type'].$aResult['osm_id']]) && !isset($aClassTypeNameDone[$aResult['osm_type'].$aResult['class'].$aResult['type'].$aResult['name'].$aResult['admin_level']])) ) {