]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib-php/TokenCountry.php
split cli tests by subcommand and extend coverage
[nominatim.git] / lib-php / TokenCountry.php
index c9b7b6af1a93b1e778f9721397dec8760809c005..ab84c388edf00e9269de3dce040505b08eb6b51a 100644 (file)
@@ -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);
     }
 
     /**