X-Git-Url: https://git.openstreetmap.org/nominatim.git/blobdiff_plain/64957170360f6d5bdf00c741de30b7df77f23bd3..9454761cca4bb3a2b0fa997797054d67078a2fcc:/website/reverse.php diff --git a/website/reverse.php b/website/reverse.php index 6df90029..0251c8c8 100755 --- a/website/reverse.php +++ b/website/reverse.php @@ -41,7 +41,7 @@ if ($sOsmType && $iOsmId > 0) { if ($oLookup) { $aPlaces = $oPlaceLookup->lookup(array($oLookup->iId => $oLookup)); - if (sizeof($aPlaces)) { + if (!empty($aPlaces)) { $aPlace = reset($aPlaces); } } @@ -62,9 +62,10 @@ if (isset($aPlace)) { $aPlace = array_merge($aPlace, $aOutlineResult); } } else { - $aPlace = []; + $aPlace = array(); } +logEnd($oDB, $hLog, sizeof($aPlace)?1:0); if (CONST_Debug) { var_dump($aPlace); @@ -72,7 +73,7 @@ if (CONST_Debug) { } if ($sOutputFormat == 'html') { - $sDataDate = chksql($oDB->getOne("select TO_CHAR(lastimportdate - '2 minutes'::interval,'YYYY/MM/DD HH24:MI')||' GMT' from import_status limit 1")); + $sDataDate = chksql($oDB->getOne("select TO_CHAR(lastimportdate,'YYYY/MM/DD HH24:MI')||' GMT' from import_status limit 1")); $sTileURL = CONST_Map_Tile_URL; $sTileAttribution = CONST_Map_Tile_Attribution; }