]> git.openstreetmap.org Git - nominatim.git/blobdiff - website/lookup.php
Merge pull request #1038 from mtmail/phpcs-array-key-alignment
[nominatim.git] / website / lookup.php
index 667686d145bad20b49fc8f409f6b05b4f2849f58..71c93715f9e47621304bbcbdc3f88f542ff70e9e 100755 (executable)
@@ -24,15 +24,12 @@ $aSearchResults = array();
 $aCleanedQueryParts = array();
 
 $oPlaceLookup = new Nominatim\PlaceLookup($oDB);
-$oPlaceLookup->setLanguagePreference($aLangPrefOrder);
-$oPlaceLookup->setIncludeAddressDetails($oParams->getBool('addressdetails', true));
-$oPlaceLookup->setIncludeExtraTags($oParams->getBool('extratags', false));
-$oPlaceLookup->setIncludeNameDetails($oParams->getBool('namedetails', false));
+$oPlaceLookup->loadParamArray($oParams);
 
 $aOsmIds = explode(',', $oParams->getString('osm_ids', ''));
 
 if (count($aOsmIds) > CONST_Places_Max_ID_count) {
-    userError('Bulk User: Only ' . CONST_Places_Max_ID_count . " ids are allowed in one request.");
+    userError('Bulk User: Only ' . CONST_Places_Max_ID_count . ' ids are allowed in one request.');
 }
 
 foreach ($aOsmIds as $sItem) {
@@ -66,7 +63,7 @@ $sQuery = join(',', $aCleanedQueryParts);
 // we initialize these to avoid warnings in our logfile
 $sViewBox = '';
 $bShowPolygons = '';
-$aExcludePlaceIDs = [];
+$aExcludePlaceIDs = array();
 $sMoreURL = '';
 
 include(CONST_BasePath.'/lib/template/search-'.$sOutputFormat.'.php');