]> 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 abc33a09ed297e382cc1d3862fc8147badc63e6f..f760dc09043e588e920bc8538efefdaca0c1cb8b 100755 (executable)
@@ -23,7 +23,7 @@
 
        // Format for output
        $sOutputFormat = 'xml';
-       if (isset($_GET['format']) && ($_GET['format'] == 'xml' || $_GET['format'] == 'json' || $_GET['format'] == 'jsonv2'))
+       if (isset($_GET['format']) && ( $_GET['format'] == 'html' || $_GET['format'] == 'xml' || $_GET['format'] == 'json' || $_GET['format'] == 'jsonv2'))
        {
                $sOutputFormat = $_GET['format'];
        }
                exit;
        }
 
+       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');