]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/lib.php
fix syntax errors from introduction of SearchDescription
[nominatim.git] / lib / lib.php
index 8f353a4d84980ee3e0d7608d2278d15bbe0992aa..f92985bac694c2f02fbdc54ffcde63c6eb4a39f3 100644 (file)
@@ -51,14 +51,6 @@ function getDatabaseDate(&$oDB)
 }
 
 
-function bySearchRank($a, $b)
-{
-    if ($a['iSearchRank'] == $b['iSearchRank'])
-        return strlen($a['sOperator']) + strlen($a['sHouseNumber']) - strlen($b['sOperator']) - strlen($b['sHouseNumber']);
-    return ($a['iSearchRank'] < $b['iSearchRank']?-1:1);
-}
-
-
 function byImportance($a, $b)
 {
     if ($a['importance'] != $b['importance'])
@@ -545,9 +537,13 @@ function _debugDumpGroupedSearches($aData, $aTokens)
             echo "<td>".$aRow['sPostcode']."</td>";
             echo "<td>".$aRow['sHouseNumber']."</td>";
 
-            echo "<td>".$aRow['fLat']."</td>";
-            echo "<td>".$aRow['fLon']."</td>";
-            echo "<td>".$aRow['fRadius']."</td>";
+            if ($aRow['oNear']) {
+                echo "<td>".$aRow['oNear']->lat()."</td>";
+                echo "<td>".$aRow['oNear']->lon()."</td>";
+                echo "<td>".$aRow['oNear']->radius()."</td>";
+            } else {
+                echo "<td></td><td></td><td></td>";
+            }
 
             echo "</tr>";
         }