From 9d8ee885918f41557094413bb7758e9adee2aa6d Mon Sep 17 00:00:00 2001 From: Brian Quinion Date: Tue, 6 Nov 2012 13:10:25 +0000 Subject: [PATCH] make number of polygon outputs allowed a constant --- settings/settings.php | 3 +++ website/search.php | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/settings/settings.php b/settings/settings.php index f441521f..a0a884fe 100644 --- a/settings/settings.php +++ b/settings/settings.php @@ -33,6 +33,9 @@ @define('CONST_Suggestions_Enabled', false); + // Set to zero to disable polygon output + @define('CONST_PolygonOutput_MaximumTypes', 1); + // Log settings @define('CONST_Log_DB', true); @define('CONST_Log_File', false); diff --git a/website/search.php b/website/search.php index ff82cadd..69f6a666 100755 --- a/website/search.php +++ b/website/search.php @@ -41,8 +41,12 @@ + ($bAsKML?1:0) + ($bAsSVG?1:0) + ($bAsTEXT?1:0) - ) > 1) { - echo "Select only one polgyon output option"; + ) > CONST_PolygonOutput_MaximumTypes) { + if (CONST_PolygonOutput_MaximumTypes) { + echo "Select only ".CONST_PolygonOutput_MaximumTypes." polgyon output option"; + } else { + echo "Polygon output is disabled"; + } exit; } -- 2.39.5