- $sAddressType = '';
- if (isset($aClassType[$aPlace['class'].':'.$aPlace['type'].':'.$aPlace['admin_level']]))
- $sAddressType = $aClassType[$aPlace['class'].':'.$aPlace['type'].':'.$aPlace['admin_level']]['simplelabel'];
- elseif (isset($aClassType[$aPlace['class'].':'.$aPlace['type']]))
- $sAddressType = $aClassType[$aPlace['class'].':'.$aPlace['type']]['simplelabel'];
- else $sAddressType = $aPlace['class'];
- $aPlace['addresstype'] = $sAddressType;
+ $sAddressType = '';
+ $sClassType = $aPlace['class'].':'.$aPlace['type'].':'.$aPlace['admin_level'];
+ if (isset($aClassType[$sClassType]) && isset($aClassType[$sClassType]['simplelabel']))
+ {
+ $sAddressType = $aClassType[$aClassType]['simplelabel'];
+ }
+ else
+ {
+ $sClassType = $aPlace['class'].':'.$aPlace['type'];
+ if (isset($aClassType[$sClassType]) && isset($aClassType[$sClassType]['simplelabel']))
+ $sAddressType = $aClassType[$sClassType]['simplelabel'];
+ else $sAddressType = $aPlace['class'];
+ }
+ $aPlace['addresstype'] = $sAddressType;