X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/b14ce959d9532f192b748b12f6c71f23a9c1a60b..5d32ac9ac918929c11602a740c3033bcfdb0f929:/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); } /**