X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/ee32315378868748fe3704616e9ca860cdc97da9..b6a831443c8f46bfe1be59ecd1cb7a6847fdf948:/lib-php/TokenCountry.php diff --git a/lib-php/TokenCountry.php b/lib-php/TokenCountry.php index c9b7b6af..ab84c388 100644 --- a/lib-php/TokenCountry.php +++ b/lib-php/TokenCountry.php @@ -36,7 +36,9 @@ class Country */ public function isExtendable($oSearch, $oPosition) { - return !$oSearch->hasCountry() && $oPosition->maybePhrase('country'); + return !$oSearch->hasCountry() + && $oPosition->maybePhrase('country') + && $oSearch->getContext()->isCountryApplicable($this->sCountryCode); } /**