diff --git a/application/cmdbabstract.class.inc.php b/application/cmdbabstract.class.inc.php index 2e58ae3273..66ae5b847c 100644 --- a/application/cmdbabstract.class.inc.php +++ b/application/cmdbabstract.class.inc.php @@ -1226,7 +1226,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(); @@ -1238,7 +1239,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 8106a0b169..c6a8450cc3 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