]> git.openstreetmap.org Git - nominatim.git/blobdiff - website/details.php
Merge branch 'tigerlines' of https://github.com/markigail/Nominatim
[nominatim.git] / website / details.php
index ad753a82a5bb93075deb5bf466287e3bb4bb6304..c7a567552c06afe614cf6ae08b2f0246d31b155f 100755 (executable)
@@ -1,7 +1,8 @@
 <?php
        @define('CONST_ConnectionBucket_PageType', 'Details');
 
-       require_once(dirname(dirname(__FILE__)).'/lib/init-website.php');
+       require_once(dirname(dirname(__FILE__)).'/settings/settings.php');
+       require_once(CONST_BasePath.'/lib/init-website.php');
        require_once(CONST_BasePath.'/lib/log.php');
 
        $sOutputFormat = 'html';
        }
 
        // Address
-       $aAddressLines = getAddressDetails($oDB, $sLanguagePrefArraySQL, $iPlaceID, $aPointDetails['country_code'], true);
+       $aAddressLines = getAddressDetails($oDB, $sLanguagePrefArraySQL, $iPlaceID, $aPointDetails['country_code'], -1, true);
 
        // Linked places
        $sSQL = "select placex.place_id, osm_type, osm_id, class, type, housenumber, admin_level, rank_address, ST_GeometryType(geometry) in ('ST_Polygon','ST_MultiPolygon') as isarea, ST_Distance_Spheroid(geometry, placegeometry, 'SPHEROID[\"WGS 84\",6378137,298.257223563, AUTHORITY[\"EPSG\",\"7030\"]]') as distance, ";
 
        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');