diff --git a/application/cmdbabstract.class.inc.php b/application/cmdbabstract.class.inc.php index ee8f8a260..ddecaf5e9 100644 --- a/application/cmdbabstract.class.inc.php +++ b/application/cmdbabstract.class.inc.php @@ -1195,7 +1195,8 @@ abstract class cmdbAbstractObject extends CMDBObject implements iDisplay else { $rawValue = $oObj->Get($sAttCodeEx); -/* + // Due to custom formatting rules, empty friendlynames may be rendered as non-empty strings + // let's fix this and make sure we render an empty string if the key == 0 if ($oAttDef instanceof AttributeFriendlyName) { $sKeyAttCode = $oAttDef->GetKeyAttCode(); @@ -1207,7 +1208,6 @@ abstract class cmdbAbstractObject extends CMDBObject implements iDisplay } } } -*/ if ($bLocalize) { $outputValue = htmlentities($oFinalAttDef->GetEditValue($rawValue), ENT_QUOTES, 'UTF-8'); diff --git a/webservices/export.php b/webservices/export.php index 8106a0b16..c6a8450cc 100644 --- a/webservices/export.php +++ b/webservices/export.php @@ -152,6 +152,10 @@ if (!empty($sExpression)) { $aAliasToFields[$sClassAlias][] = $oAttDef->GetParentAttCode(); } + else if($oAttDef instanceof AttributeFriendlyname) + { + $aAliasToFields[$sClassAlias][] = $oAttDef->GetKeyAttCode(); + } } // Read query parameters