]> git.openstreetmap.org Git - nominatim.git/blobdiff - website/reverse.php
refactor ReverseGeocode
[nominatim.git] / website / reverse.php
index 7f5eca78e5cea47237dbcbf5279761f0f38403ad..07ef2d745b1d9517def19a83068068d964983c31 100755 (executable)
@@ -8,19 +8,6 @@
        require_once(CONST_BasePath.'/lib/ReverseGeocode.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)
-               {
-                       echo "Bulk User: Temporary block due to high server load\n";
-                       exit;
-               }
-       }
-
-
        $bAsGeoJSON = getParamBool('polygon_geojson');
        $bAsKML = getParamBool('polygon_kml');
        $bAsSVG = getParamBool('polygon_svg');
        else if ($fLat !== false && $fLon !==false)
        {
                $oReverseGeocode = new ReverseGeocode($oDB);
-               $oReverseGeocode->setLanguagePreference($aLangPrefOrder);
-
-               $oReverseGeocode->setLatLon($fLat, $fLon);
                $oReverseGeocode->setZoom(getParamInt('zoom', 18));
 
-               $aLookup = $oReverseGeocode->lookup();
+               $aLookup = $oReverseGeocode->lookup($fLat, $fLon);
                if (CONST_Debug) var_dump($aLookup);
        }
        else if ($sOutputFormat != 'html')