]> git.openstreetmap.org Git - nominatim.git/blobdiff - website/reverse.php
query the last updated timestamp only if output format is HTML
[nominatim.git] / website / reverse.php
index e2dfaef80eeccdadae886f0611ba575e8a789584..f760dc09043e588e920bc8538efefdaca0c1cb8b 100755 (executable)
                exit;
        }
 
                exit;
        }
 
-       $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/address-'.$sOutputFormat.'.php');
        include(CONST_BasePath.'/lib/template/address-'.$sOutputFormat.'.php');