From 6ff987322b4611e4804d0b3cc294788332249bc9 Mon Sep 17 00:00:00 2001 From: Brian Quinion Date: Wed, 11 May 2011 10:30:58 +0000 Subject: [PATCH] country searches not filtered by countrycodes param, fixes #3756 --- website/search.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); } } -- 2.39.5