X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/db3ced17bbfff00411f506d8c84419c875959d5e..3734f1d0b84c642ba89b5a4c39bac845f5627be7:/lib-php/website/lookup.php diff --git a/lib-php/website/lookup.php b/lib-php/website/lookup.php index 737edc62..3a7ddb85 100644 --- a/lib-php/website/lookup.php +++ b/lib-php/website/lookup.php @@ -1,4 +1,12 @@ CONST_Places_Max_ID_count) { foreach ($aOsmIds as $sItem) { // Skip empty sItem - if (empty($sItem)) continue; - + if (empty($sItem)) { + continue; + } + $sType = $sItem[0]; $iId = (int) substr($sItem, 1); if ($iId > 0 && ($sType == 'N' || $sType == 'W' || $sType == 'R')) { @@ -48,7 +58,9 @@ foreach ($aOsmIds as $sItem) { // key names $oResult = $oPlace; unset($oResult['aAddress']); - if (isset($oPlace['aAddress'])) $oResult['address'] = $oPlace['aAddress']; + if (isset($oPlace['aAddress'])) { + $oResult['address'] = $oPlace['aAddress']; + } if ($sOutputFormat != 'geocodejson') { unset($oResult['langaddress']); $oResult['name'] = $oPlace['langaddress']; @@ -71,7 +83,9 @@ foreach ($aOsmIds as $sItem) { } -if (CONST_Debug) exit; +if (CONST_Debug) { + exit; +} $sXmlRootTag = 'lookupresults'; $sQuery = join(',', $aCleanedQueryParts);