From 60c4c9ef2cd4e0070dbb8a7a4455f582a0502563 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Sun, 29 Mar 2020 20:49:35 +0200 Subject: [PATCH] rather use new place_type in getAddressNames() If for a boundary the place_type is defined, handle the address part like a place node. This is the same behaviour as before when class/type where patched earlier. --- lib/ClassTypes.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/ClassTypes.php b/lib/ClassTypes.php index d46847f1..91066a1f 100644 --- a/lib/ClassTypes.php +++ b/lib/ClassTypes.php @@ -6,6 +6,13 @@ function getInfo($aPlace) { $aClassType = getList(); + if ($aPlace['type'] == 'administrative' && isset($aPlace['place_type'])) { + $sName = 'place:'.$aPlace['place_type']; + if (isset($aClassType[$sName])) { + return $aClassType[$sName]; + } + } + if (isset($aPlace['admin_level'])) { $sName = $aPlace['class'].':'.$aPlace['type'].':'.$aPlace['admin_level']; if (isset($aClassType[$sName])) { -- 2.39.5