X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/09595697cce1000137c7758b7bef211f80635d04..2a4198f94d1c52bb7e0042cf1b4074f277538384:/lib/AddressDetails.php diff --git a/lib/AddressDetails.php b/lib/AddressDetails.php index e6501b57..f5293586 100644 --- a/lib/AddressDetails.php +++ b/lib/AddressDetails.php @@ -26,7 +26,7 @@ class AddressDetails $sSQL .= ' FROM get_addressdata('.$iPlaceID.','.$sHousenumber.')'; $sSQL .= ' ORDER BY rank_address DESC, isaddress DESC'; - $this->aAddressLines = chksql($oDB->getAll($sSQL)); + $this->aAddressLines = $oDB->getAll($sSQL); } private static function isAddress($aLine) @@ -103,7 +103,7 @@ class AddressDetails public function getAdminLevels() { $aAddress = array(); - foreach ($this->aAddressLines as $aLine) { + foreach (array_reverse($this->aAddressLines) as $aLine) { if (self::isAddress($aLine) && isset($aLine['admin_level']) && $aLine['admin_level'] < 15