mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-20 09:08:42 +02:00
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:
@@ -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');
|
||||
|
||||
@@ -152,6 +152,10 @@ if (!empty($sExpression))
|
||||
{
|
||||
$aAliasToFields[$sClassAlias][] = $oAttDef->GetParentAttCode();
|
||||
}
|
||||
else if($oAttDef instanceof AttributeFriendlyname)
|
||||
{
|
||||
$aAliasToFields[$sClassAlias][] = $oAttDef->GetKeyAttCode();
|
||||
}
|
||||
}
|
||||
|
||||
// Read query parameters
|
||||
|
||||
Reference in New Issue
Block a user