]> git.openstreetmap.org Git - nominatim.git/commitdiff
only allow either postcode or special search
authorSarah Hoffmann <lonvia@denofr.de>
Wed, 4 Oct 2017 18:15:06 +0000 (20:15 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Wed, 4 Oct 2017 18:15:06 +0000 (20:15 +0200)
Fixes #804.

lib/Geocode.php

index aef2d3841cc5f4eec9d4e060baf002700e463f1f..a7558bea6ff2bac687b6cb9813db26aa3e95a0fd 100644 (file)
@@ -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'];