]> git.openstreetmap.org Git - nominatim.git/blobdiff - website/lookup.php
Merge remote-tracking branch 'upstream/master' into cmake-port
[nominatim.git] / website / lookup.php
index 9d0cea4cc3602d4dd22b840c53cb79b2f621821a..5fc6c309ad2b955ddfc3dadf0a0bc286a0e35376 100755 (executable)
@@ -7,18 +7,6 @@
        require_once(CONST_BasePath.'/lib/PlaceLookup.php');
        require_once(CONST_BasePath.'/lib/output.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;
-               }
-       }
-
        $oDB =& getDB();
        ini_set('memory_limit', '200M');
 
@@ -56,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