X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/d45524cbfb299f5004a03c52802c64749c5ad212..1d4dcd914fd277aebf242037064612224f4dde54:/website/lookup.php diff --git a/website/lookup.php b/website/lookup.php index 60bd60eb..5fc6c309 100755 --- a/website/lookup.php +++ b/website/lookup.php @@ -5,18 +5,7 @@ require_once(CONST_BasePath.'/lib/init-website.php'); require_once(CONST_BasePath.'/lib/log.php'); require_once(CONST_BasePath.'/lib/PlaceLookup.php'); - - if (strpos(CONST_BulkUserIPs, ','.$_SERVER["REMOTE_ADDR"].',') !== false) - { - $fLoadAvg = getLoadAverage(); - if ($fLoadAvg > 2) sleep(60); - if ($fLoadAvg > 4) sleep(120); - if ($fLoadAvg > 6) - { - userError("Bulk User: Temporary block due to high server load"); - exit; - } - } + require_once(CONST_BasePath.'/lib/output.php'); $oDB =& getDB(); ini_set('memory_limit', '200M'); @@ -38,7 +27,7 @@ $oPlaceLookup->setIncludeExtraTags(getParamBool('extratags', false)); $oPlaceLookup->setIncludeNameDetails(getParamBool('namedetails', false)); - $aOsmIds = explode(',', $getParamString('osm_ids', '')); + $aOsmIds = explode(',', getParamString('osm_ids', '')); if (count($aOsmIds) > CONST_Places_Max_ID_count) { @@ -55,8 +44,7 @@ if ( $iId > 0 && ($sType == 'N' || $sType == 'W' || $sType == 'R') ) { $aCleanedQueryParts[] = $sType . $iId; - $oPlaceLookup->setOSMID($sType, $iId); - $oPlace = $oPlaceLookup->lookup(); + $oPlace = $oPlaceLookup->lookupOSMID($sType, $iId); if ($oPlace){ // we want to use the search-* output templates, so we need to fill // $aSearchResults and slightly change the (reverse search) oPlace