From: Sarah Hoffmann Date: Wed, 4 Oct 2017 18:15:06 +0000 (+0200) Subject: only allow either postcode or special search X-Git-Tag: v3.1.0~57 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/32f6ddf6dbd6972610e244d6a603aa16f62321ac only allow either postcode or special search Fixes #804. --- diff --git a/lib/Geocode.php b/lib/Geocode.php index aef2d384..a7558bea 100644 --- a/lib/Geocode.php +++ b/lib/Geocode.php @@ -785,7 +785,7 @@ class Geocode // require a normalized exact match of the term // if we have the normalizer version of the query // available - if ($aSearch['sClass'] === '' + if ($aSearch['sOperator'] === '' && ($sNormQuery === null || !($aSearchTerm['word'] && strpos($sNormQuery, $aSearchTerm['word']) === false))) { $aSearch['sClass'] = $aSearchTerm['class']; $aSearch['sType'] = $aSearchTerm['type'];