From: Brian Quinion Date: Tue, 6 Nov 2012 13:10:25 +0000 (+0000) Subject: make number of polygon outputs allowed a constant X-Git-Tag: v2.2.0~193 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/9d8ee885918f41557094413bb7758e9adee2aa6d make number of polygon outputs allowed a constant --- 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; }