X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/76b9eb809815f0cc472bb2c8a8e6b613a4973e24..4f75f4cb6e468a8de282a81615e7c720e154c8b4:/website/reverse.php diff --git a/website/reverse.php b/website/reverse.php index 430d9e39..0e0f2ff8 100755 --- a/website/reverse.php +++ b/website/reverse.php @@ -6,19 +6,7 @@ require_once(CONST_BasePath.'/lib/log.php'); require_once(CONST_BasePath.'/lib/PlaceLookup.php'); require_once(CONST_BasePath.'/lib/ReverseGeocode.php'); - - if (strpos(CONST_BulkUserIPs, ','.$_SERVER["REMOTE_ADDR"].',') !== false) - { - $fLoadAvg = getLoadAverage(); - if ($fLoadAvg > 2) sleep(60); - if ($fLoadAvg > 4) sleep(120); - if ($fLoadAvg > 6) - { - echo "Bulk User: Temporary block due to high server load\n"; - exit; - } - } - + require_once(CONST_BasePath.'/lib/output.php'); $bAsGeoJSON = getParamBool('polygon_geojson'); $bAsKML = getParamBool('polygon_kml'); @@ -55,8 +43,8 @@ $hLog = logStart($oDB, 'reverse', $_SERVER['QUERY_STRING'], $aLangPrefOrder); - $sOsmType = getParamSet('osmtype', array('N', 'W', 'R')); - $iOsmId = getParamInt('osmid', -1); + $sOsmType = getParamSet('osm_type', array('N', 'W', 'R')); + $iOsmId = getParamInt('osm_id', -1); $fLat = getParamFloat('lat'); $fLon = getParamFloat('lon'); if ($sOsmType && $iOsmId > 0) @@ -118,7 +106,7 @@ if ($sOutputFormat=='html') { - $sDataDate = $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 - '2 minutes'::interval,'YYYY/MM/DD HH24:MI')||' GMT' from import_status limit 1")); $sTileURL = CONST_Map_Tile_URL; $sTileAttribution = CONST_Map_Tile_Attribution; }