mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 15:47:58 +00:00
Merge pull request #1445 from mtmail/hierarchy-endpoint-broke
/hierarchy.php was missing namespace calling AddressDetails
This commit is contained in:
@@ -14,7 +14,7 @@ class AddressDetails
|
|||||||
public function __construct(&$oDB, $iPlaceID, $sHousenumber, $mLangPref)
|
public function __construct(&$oDB, $iPlaceID, $sHousenumber, $mLangPref)
|
||||||
{
|
{
|
||||||
if (is_array($mLangPref)) {
|
if (is_array($mLangPref)) {
|
||||||
$mLangPref = 'ARRAY['.join(',', array_map('getDBQuoted', $mLangPref)).']';
|
$mLangPref = $oDB->getArraySQL($oDB->getDBQuotedList($mLangPref));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($sHousenumber)) {
|
if (!isset($sHousenumber)) {
|
||||||
|
|||||||
@@ -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());
|
$aPlaceAddress = array_reverse($oAddressLookup->getAddressDetails());
|
||||||
|
|
||||||
if (empty($aPlaceAddress)) userError('Unknown place id.');
|
if (empty($aPlaceAddress)) userError('Unknown place id.');
|
||||||
|
|||||||
Reference in New Issue
Block a user