X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/ee32315378868748fe3704616e9ca860cdc97da9..3734f1d0b84c642ba89b5a4c39bac845f5627be7:/lib-php/TokenCountry.php 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); } /**