X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/27bc8d4f7bb907699dbb974e8159f75bead831c9..e4a51e460e0e7020fed0eeeb8b6cce7148e0bb58:/website/hierarchy.php diff --git a/website/hierarchy.php b/website/hierarchy.php index 9b488f83..3ac4f323 100755 --- a/website/hierarchy.php +++ b/website/hierarchy.php @@ -4,7 +4,7 @@ require_once(dirname(dirname(__FILE__)).'/settings/settings.php'); require_once(CONST_BasePath.'/lib/init-website.php'); require_once(CONST_BasePath.'/lib/log.php'); -require_once(CONST_BasePath.'/lib/PlaceLookup.php'); +require_once(CONST_BasePath.'/lib/AddressDetails.php'); require_once(CONST_BasePath.'/lib/output.php'); ini_set('memory_limit', '200M'); @@ -56,11 +56,9 @@ if (CONST_Use_Aux_Location_data) { if ($iParentPlaceID) $iPlaceID = $iParentPlaceID; } -$oPlaceLookup = new Nominatim\PlaceLookup($oDB); -$oPlaceLookup->setLanguagePreference($aLangPrefOrder); -$oPlaceLookup->setIncludeAddressDetails(true); -$aPlaceAddress = array_reverse($oPlaceLookup->getAddressDetails($iPlaceID)); +$oAddressLookup = new AddressDetails($oDB, $iPlaceID, -1, $aLangPrefOrder); +$aPlaceAddress = array_reverse($oAddressLookup->getAddressDetails()); if (empty($aPlaceAddress)) userError('Unknown place id.'); @@ -102,18 +100,12 @@ $aParentOfLines = chksql($oDB->getAll($sSQL)); if (!empty($aParentOfLines)) { echo '