]> git.openstreetmap.org Git - nominatim.git/commitdiff
disable housenumber-specific search when no address details are provided
authorSarah Hoffmann <lonvia@denofr.de>
Thu, 5 Feb 2015 20:13:33 +0000 (21:13 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Thu, 5 Feb 2015 20:13:33 +0000 (21:13 +0100)
lib/Geocode.php

index 2c736475be050fbe991c0bb8eb55b1a954d99c24..a8fe11e2dbcc320cfc1b3aa5b27c397b788e4953 100644 (file)
                                                        $aTerms = array();
                                                        $aOrder = array();
 
-                                                       if ($aSearch['sHouseNumber'])
+                                                       if ($aSearch['sHouseNumber'] && sizeof($aSearch['aAddress']))
                                                        {
                                                                $sHouseNumberRegex = '\\\\m'.$aSearch['sHouseNumber'].'\\\\M';
                                                                $aOrder[] = "exists(select place_id from placex where parent_place_id = search_name.place_id and transliteration(housenumber) ~* E'".$sHouseNumberRegex."' limit 1) desc";