X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/1424e8e29bd54d3f713a38a834ff0c8ff5f463fb..118517b076c048b2e22a6fdf1394d127afcfa262:/lib/lib.php diff --git a/lib/lib.php b/lib/lib.php index afcc3c7f..b5c4df13 100644 --- a/lib/lib.php +++ b/lib/lib.php @@ -38,7 +38,7 @@ function getDatabaseDate(&$oDB) // Find the newest node in the DB $iLastOSMID = $oDB->getOne("select max(osm_id) from place where osm_type = 'N'"); // Lookup the timestamp that node was created - $sLastNodeURL = 'https://www.openstreetmap.org/api/0.6/node/'.$iLastOSMID."/1"; + $sLastNodeURL = 'https://www.openstreetmap.org/api/0.6/node/'.$iLastOSMID.'/1'; $sLastNodeXML = file_get_contents($sLastNodeURL); if ($sLastNodeXML === false) { @@ -413,11 +413,11 @@ function javascript_renderData($xVal, $iOptions = 0) $jsonout = json_encode($xVal, $iOptions); if (!isset($_GET['json_callback'])) { - header("Content-Type: application/json; charset=UTF-8"); + header('Content-Type: application/json; charset=UTF-8'); echo $jsonout; } else { if (preg_match('/^[$_\p{L}][$_\p{L}\p{Nd}.[\]]*$/u', $_GET['json_callback'])) { - header("Content-Type: application/javascript; charset=UTF-8"); + header('Content-Type: application/javascript; charset=UTF-8'); echo $_GET['json_callback'].'('.$jsonout.')'; } else { header('HTTP/1.0 400 Bad Request'); @@ -439,16 +439,16 @@ function _debugDumpGroupedSearches($aData, $aTokens) } } } - echo ""; - echo ""; - echo ""; - echo ""; + echo '
rankName TokensName NotAddress TokensAddress Notcountryoperatorclasstypepostcodehousenumber
'; + echo ''; + echo ''; + echo ''; foreach ($aData as $iRank => $aRankedSet) { foreach ($aRankedSet as $aRow) { $aRow->dumpAsHtmlTableRow($aWordsIDs); } } - echo "
rankName TokensName NotAddress TokensAddress Notcountryoperatorclasstypepostcodehousenumber
"; + echo ''; } @@ -456,7 +456,7 @@ function getAddressDetails(&$oDB, $sLanguagePrefArraySQL, $iPlaceID, $sCountryCo { $sSQL = "select *,get_name_by_language(name,$sLanguagePrefArraySQL) as localname from get_addressdata($iPlaceID, $housenumber)"; if (!$bRaw) $sSQL .= " WHERE isaddress OR type = 'country_code'"; - $sSQL .= " order by rank_address desc,isaddress desc"; + $sSQL .= ' order by rank_address desc,isaddress desc'; $aAddressLines = chksql($oDB->getAll($sSQL)); if ($bRaw) return $aAddressLines;