]> git.openstreetmap.org Git - nominatim.git/blobdiff - website/hierarchy.php
experimental: disable early break from search loop
[nominatim.git] / website / hierarchy.php
index 87e8a0afbb258fdaefd03d2169baac6d5522fcbc..66699f554524b053c193c9f4bad24f5398cae584 100644 (file)
@@ -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.');
 $aPlaceAddress = array_reverse($oAddressLookup->getAddressDetails());
 
 if (empty($aPlaceAddress)) userError('Unknown place id.');
@@ -103,10 +103,8 @@ if (!empty($aParentOfLines)) {
     echo '<h2>Parent Of:</h2>';
     $aGroupedAddressLines = array();
     foreach ($aParentOfLines as $aAddressLine) {
     echo '<h2>Parent Of:</h2>';
     $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;
 
         if (!isset($aGroupedAddressLines[$aAddressLine['label']])) $aGroupedAddressLines[$aAddressLine['label']] = array();
             $aGroupedAddressLines[$aAddressLine['label']][] = $aAddressLine;