]> git.openstreetmap.org Git - nominatim.git/blobdiff - website/details.php
query the last updated timestamp only if output format is HTML
[nominatim.git] / website / details.php
index ad753a82a5bb93075deb5bf466287e3bb4bb6304..3a0fee82a29fb2d70dc9e0b2138dc15e6671a71b 100755 (executable)
 
        logEnd($oDB, $hLog, 1);
 
-       $sTileURL = CONST_Map_Tile_URL;
-       $sTileAttribution = CONST_Map_Tile_Attribution;
+       if ($sOutputFormat=='html')
+       {
+               $sDataDate = $oDB->getOne("select TO_CHAR(lastimportdate - '2 minutes'::interval,'YYYY/MM/DD HH24:MI')||' GMT' from import_status limit 1");
+               $sTileURL = CONST_Map_Tile_URL;
+               $sTileAttribution = CONST_Map_Tile_Attribution;
+       }
+
        
        include(CONST_BasePath.'/lib/template/details-'.$sOutputFormat.'.php');