X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/b14ce959d9532f192b748b12f6c71f23a9c1a60b..1260b0c95d0551a1677219f48a0651390e6357d4:/lib-php/TokenCountry.php?ds=inline diff --git a/lib-php/TokenCountry.php b/lib-php/TokenCountry.php index c9b7b6af..3f93f45e 100644 --- a/lib-php/TokenCountry.php +++ b/lib-php/TokenCountry.php @@ -1,4 +1,12 @@ hasCountry() && $oPosition->maybePhrase('country'); + return !$oSearch->hasCountry() + && $oPosition->maybePhrase('country') + && $oSearch->getContext()->isCountryApplicable($this->sCountryCode); } /**