X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/044bb6afa53f2c799490d8a95ca050c8b755ca4c..500c61685b16fd1d51e7b5f4738c788a9d00eab4:/lib-php/Geocode.php diff --git a/lib-php/Geocode.php b/lib-php/Geocode.php index 53ee49c0..ccb8a810 100644 --- a/lib-php/Geocode.php +++ b/lib-php/Geocode.php @@ -348,8 +348,6 @@ class Geocode foreach ($oValidTokens->get(' '.$sToken) as $oSearchTerm) { $aNewSearches = $oCurrentSearch->extendWithFullTerm( $oSearchTerm, - $oValidTokens->contains($sToken) - && strpos($sToken, ' ') === false, $sPhraseType, $iToken == 0 && $iPhrase == 0, $iPhrase == 0, @@ -419,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; @@ -505,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.'); @@ -893,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']])) ) {