X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/f00b8dd1c315e0b887df340b1dc4f6cced3b06c2..896199c9d4f9252307b1068cbe94fa8aedfedcf8:/lib-php/Geocode.php?ds=inline diff --git a/lib-php/Geocode.php b/lib-php/Geocode.php index 43d10368..bf9a3262 100644 --- a/lib-php/Geocode.php +++ b/lib-php/Geocode.php @@ -1,4 +1,12 @@ getGroupedSearches($aSearches, $aPhrases, $oValidTokens); - foreach ($aGroupedSearches as $aSearches) { + foreach ($aReverseGroupedSearches as $aSearches) { foreach ($aSearches as $aSearch) { - if (!isset($aReverseGroupedSearches[$aSearch->getRank()])) { - $aReverseGroupedSearches[$aSearch->getRank()] = array(); + if (!isset($aGroupedSearches[$aSearch->getRank()])) { + $aGroupedSearches[$aSearch->getRank()] = array(); } - $aReverseGroupedSearches[$aSearch->getRank()][] = $aSearch; + $aGroupedSearches[$aSearch->getRank()][] = $aSearch; } } - $aGroupedSearches = $aReverseGroupedSearches; ksort($aGroupedSearches); } } else {