X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/6a7e0d652b1d40a397e1c1386d500101796676c4..9a1f891998d9b56481b96b5201317494987302e1:/lib-php/website/lookup.php?ds=inline 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);