]> git.openstreetmap.org Git - nominatim.git/commitdiff
enforce limit as maximum number of results
authorBrian Quinion <openstreetmap@brian.quinion.co.uk>
Tue, 3 May 2011 14:22:22 +0000 (14:22 +0000)
committerBrian Quinion <openstreetmap@brian.quinion.co.uk>
Tue, 3 May 2011 14:22:22 +0000 (14:22 +0000)
website/search.php

index 1efb7ff5805a981fda5c51473a88801783c0f226..cd52d227acf11f6601b5cfdd96fc4be02878229d 100755 (executable)
                        $aClassTypeNameDone[$aResult['osm_type'].$aResult['osm_class'].$aResult['name']] = true;
                        $aSearchResults[] = $aResult;
                }
+
+               // Absolute limit on number of results
+               if (sizeof($aSearchResults) >= $iLimit) break;
        }
 
        $sDataDate = $oDB->getOne("select TO_CHAR(lastimportdate - '1 day'::interval,'YYYY/MM/DD') from import_status limit 1");