disable housenumber-specific search when no address details are provided

This commit is contained in:
Sarah Hoffmann 2015-02-05 21:13:33 +01:00
parent 62ed8b9e0c
commit c9f3d7d08b

View File

@ -1240,7 +1240,7 @@
$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";