]> git.openstreetmap.org Git - nominatim.git/commitdiff
Merge remote-tracking branch 'upstream/master'
authorSarah Hoffmann <lonvia@denofr.de>
Wed, 26 Aug 2020 18:53:03 +0000 (20:53 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Wed, 26 Aug 2020 18:53:03 +0000 (20:53 +0200)
lib/PlaceLookup.php
lib/lib.php

index eebfe98301cc16d2ffc100bbbc0869e358d71167..0a285a6a78b69ab7b5b9f16c8493a7f1c22718bb 100644 (file)
@@ -452,11 +452,13 @@ class PlaceLookup
                 $aPlace,
                 $aPlace['country_code']
             );
+
+            $aResults[$aPlace['place_id']] = $aPlace;
         }
 
-        Debug::printVar('Places', $aPlaces);
+        Debug::printVar('Places', $aResults);
 
-        return $aPlaces;
+        return $aResults;
     }
 
     /* returns an array which will contain the keys
index c4fbca308636e60e0cd0e59a27fc63eb517b7597..fcd220667bcdede296654b8db9d80a827f9dab8e 100644 (file)
@@ -55,7 +55,7 @@ function byImportance($a, $b)
     if ($a['importance'] != $b['importance'])
         return ($a['importance'] > $b['importance']?-1:1);
 
-    return ($a['foundorder'] < $b['foundorder']?-1:1);
+    return $a['foundorder'] <=> $b['foundorder'];
 }