From: Brian Quinion Date: Wed, 11 May 2011 10:30:58 +0000 (+0000) Subject: country searches not filtered by countrycodes param, fixes #3756 X-Git-Tag: v2.0.0~142 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/6ff987322b4611e4804d0b3cc294788332249bc9 country searches not filtered by countrycodes param, fixes #3756 --- diff --git a/website/search.php b/website/search.php index 2ee07e3c..1ef21e5c 100755 --- a/website/search.php +++ b/website/search.php @@ -664,7 +664,9 @@ { if (4 >= $iMinAddressRank && 4 <= $iMaxAddressRank) { - $sSQL = "select place_id from placex where country_code='".$aSearch['sCountryCode']."' and rank_search = 4 order by st_area(geometry) desc limit 1"; + $sSQL = "select place_id from placex where country_code='".$aSearch['sCountryCode']."' and rank_search = 4"; + if ($sCountryCodesSQL) $sSQL .= " and country_code in ($sCountryCodesSQL)"; + $sSQL .= " order by st_area(geometry) desc limit 1"; $aPlaceIDs = $oDB->getCol($sSQL); } }