X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/7d9dbd62c7b600eea005b2626c1e6c2f70329619..f42e40712e1a20d9e6ca1e497123a0c16c83be82:/lib/AddressDetails.php diff --git a/lib/AddressDetails.php b/lib/AddressDetails.php index 7b30d915..783a0fda 100644 --- a/lib/AddressDetails.php +++ b/lib/AddressDetails.php @@ -14,7 +14,7 @@ class AddressDetails public function __construct(&$oDB, $iPlaceID, $sHousenumber, $mLangPref) { if (is_array($mLangPref)) { - $mLangPref = 'ARRAY['.join(',', array_map('getDBQuoted', $mLangPref)).']'; + $mLangPref = $oDB->getArraySQL($oDB->getDBQuotedList($mLangPref)); } if (!isset($sHousenumber)) { @@ -31,7 +31,7 @@ class AddressDetails 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 @@ class AddressDetails $sPrevResult = ''; foreach ($this->aAddressLines as $aLine) { - if ($aLine['isaddress'] == 't' && $sPrevResult != $aLine['localname']) { + if ($aLine['isaddress'] && $sPrevResult != $aLine['localname']) { $sPrevResult = $aLine['localname']; $aParts[] = $sPrevResult; }