From f942f7c3bf8792497a9d72f2567c1c7cd19f6140 Mon Sep 17 00:00:00 2001 From: Brian Quinion Date: Tue, 6 Nov 2012 13:06:46 +0000 Subject: [PATCH] limit polygon output to one type as a time --- website/search.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/website/search.php b/website/search.php index e2ef1d3c..ff82cadd 100755 --- a/website/search.php +++ b/website/search.php @@ -36,6 +36,15 @@ $bAsKML = (boolean)isset($_GET['polygon_kml']) && $_GET['polygon_kml']; $bAsSVG = (boolean)isset($_GET['polygon_svg']) && $_GET['polygon_svg']; $bAsText = (boolean)isset($_GET['polygon_text']) && $_GET['polygon_text']; + if ((($bShowPolygons?1:0) + + ($bAsGeoJSON?1:0) + + ($bAsKML?1:0) + + ($bAsSVG?1:0) + + ($bAsTEXT?1:0) + ) > 1) { + echo "Select only one polgyon output option"; + exit; + } // Show address breakdown $bShowAddressDetails = isset($_GET['addressdetails']) && $_GET['addressdetails']; -- 2.39.5