]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/AddressDetails.php
Merge remote-tracking branch 'upstream/master'
[nominatim.git] / lib / AddressDetails.php
index e6501b572d5b59b3632a0d61e14f711f5fa729c9..618e10c908ad0d962bb2f9c37d3f91920497aee4 100644 (file)
@@ -103,7 +103,7 @@ class AddressDetails
     public function getAdminLevels()
     {
         $aAddress = array();
     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
             if (self::isAddress($aLine)
                 && isset($aLine['admin_level'])
                 && $aLine['admin_level'] < 15