From: Sarah Hoffmann Date: Fri, 19 Apr 2019 16:29:43 +0000 (+0200) Subject: Merge pull request #1321 from mtmail/interpolating-0-housenumbers X-Git-Tag: v3.3.0~6 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/b612b9942109a08c6ff8f49e3327e015fec08e67?hp=-c Merge pull request #1321 from mtmail/interpolating-0-housenumbers Support housenumber=0 in interpolations --- b612b9942109a08c6ff8f49e3327e015fec08e67 diff --combined lib/AddressDetails.php index 2d40c84f,7b30d915..b62335d1 --- a/lib/AddressDetails.php +++ b/lib/AddressDetails.php @@@ -17,7 -17,7 +17,7 @@@ class AddressDetail $mLangPref = 'ARRAY['.join(',', array_map('getDBQuoted', $mLangPref)).']'; } - if (!$sHousenumber) { + if (!isset($sHousenumber)) { $sHousenumber = -1; } @@@ -31,7 -31,7 +31,7 @@@ private static function isAddress($aLine) { - return $aLine['isaddress'] == 't' || $aLine['type'] == 'country_code'; + return $aLine['isaddress'] || $aLine['type'] == 'country_code'; } public function getAddressDetails($bAll = false) @@@ -49,7 -49,7 +49,7 @@@ $sPrevResult = ''; foreach ($this->aAddressLines as $aLine) { - if ($aLine['isaddress'] == 't' && $sPrevResult != $aLine['localname']) { + if ($aLine['isaddress'] && $sPrevResult != $aLine['localname']) { $sPrevResult = $aLine['localname']; $aParts[] = $sPrevResult; }