Fix of a regression introduced by [3146]: due to formatting rules, empty friendlynames may not look like empty strings! -retrofit from trunk.

SVN:2.0.2[3173]
This commit is contained in:
Denis Flaven
2014-05-23 15:52:27 +00:00
parent f72e1dd542
commit d0280b9672
2 changed files with 6 additions and 2 deletions

View File

@@ -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');

View File

@@ -152,6 +152,10 @@ if (!empty($sExpression))
{
$aAliasToFields[$sClassAlias][] = $oAttDef->GetParentAttCode();
}
else if($oAttDef instanceof AttributeFriendlyname)
{
$aAliasToFields[$sClassAlias][] = $oAttDef->GetKeyAttCode();
}
}
// Read query parameters