- fixed bug #52 (display of lnkInfraError objects) by adding a protection in GetDisplayName against objects that actually do not have any name.

SVN:trunk[203]
This commit is contained in:
Denis Flaven
2009-12-21 20:11:29 +00:00
parent 8bb9176d36
commit d3d617fabe

View File

@@ -189,7 +189,12 @@ abstract class cmdbAbstractObject extends CMDBObject
function GetDisplayName()
{
return $this->GetAsHTML(MetaModel::GetNameAttributeCode(get_class($this)));
$sDisplayName = '';
if (MetaModel::GetNameAttributeCode(get_class($this)) != '')
{
$sDisplayName = $this->GetAsHTML(MetaModel::GetNameAttributeCode(get_class($this)));
}
return $sDisplayName;
}
function GetBareDetails(web_page $oPage)