X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/a7e782353522da11504efd6e1948b86e2a97e7f7..f5cbe0e6babf9b4649eb2e00717d21474052b08e:/website/hierarchy.php diff --git a/website/hierarchy.php b/website/hierarchy.php index 87e8a0af..66699f55 100644 --- a/website/hierarchy.php +++ b/website/hierarchy.php @@ -58,7 +58,7 @@ if (CONST_Use_Aux_Location_data) { } -$oAddressLookup = new AddressDetails($oDB, $iPlaceID, -1, $aLangPrefOrder); +$oAddressLookup = new Nominatim\AddressDetails($oDB, $iPlaceID, -1, $aLangPrefOrder); $aPlaceAddress = array_reverse($oAddressLookup->getAddressDetails()); if (empty($aPlaceAddress)) userError('Unknown place id.'); @@ -103,10 +103,8 @@ if (!empty($aParentOfLines)) { echo '

Parent Of:

'; $aGroupedAddressLines = array(); foreach ($aParentOfLines as $aAddressLine) { - $aAddressLine['label'] = Nominatim\ClassTypes\getProperty($aAddressLine, 'label'); - if (!$aAddressLine['label']) { - $aAddressLine['label'] = ucwords($aAddressLine['type']); - } + $aAddressLine['label'] = Nominatim\ClassTypes\getLabel($aAddressLine) + ?? ucwords($aAddressLine['type']); if (!isset($aGroupedAddressLines[$aAddressLine['label']])) $aGroupedAddressLines[$aAddressLine['label']] = array(); $aGroupedAddressLines[$aAddressLine['label']][] = $aAddressLine;