X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/78d11fe62830fac30d7241d05cf0c2b74dfeeb00..0fb8eade136ea03e7853aca0795ca69833c33661:/lib-php/tokenizer/legacy_tokenizer.php diff --git a/lib-php/tokenizer/legacy_tokenizer.php b/lib-php/tokenizer/legacy_tokenizer.php index 570b8828..6760057d 100644 --- a/lib-php/tokenizer/legacy_tokenizer.php +++ b/lib-php/tokenizer/legacy_tokenizer.php @@ -7,7 +7,6 @@ class Tokenizer private $oDB; private $oNormalizer = null; - private $aCountryRestriction = null; public function __construct(&$oDB) { @@ -37,12 +36,6 @@ class Tokenizer } - public function setCountryRestriction($aCountries) - { - $this->aCountryRestriction = $aCountries; - } - - public function normalizeString($sTerm) { if ($this->oNormalizer === null) { @@ -206,12 +199,7 @@ class Tokenizer ); } } elseif ($aWord['country_code']) { - // Filter country tokens that do not match restricted countries. - if (!$this->aCountryRestriction - || in_array($aWord['country_code'], $this->aCountryRestriction) - ) { - $oToken = new Token\Country($iId, $aWord['country_code']); - } + $oToken = new Token\Country($iId, $aWord['country_code']); } elseif ($aWord['word_token'][0] == ' ') { $oToken = new Token\Word( $iId,