(Retrofitted from trunk) N.780 Friendly name format ignored if only one attribute is used

SVN:2.3[4631]
This commit is contained in:
Romain Quetiez
2017-03-29 09:24:21 +00:00
parent c15853d982
commit d0c1d94b14

View File

@@ -1,5 +1,5 @@
<?php
// Copyright (C) 2011-2016 Combodo SARL
// Copyright (C) 2011-2017 Combodo SARL
//
// This file is part of iTop.
//
@@ -889,16 +889,11 @@ EOF
{
$aNameAttCodes[] = $oAttribute->getAttribute('id');
}
if (count($aNameAttCodes) > 1)
if (count($aNameAttCodes) > 0)
{
// New style...
$sNameAttCode = "array('".implode("', '", $aNameAttCodes)."')";
}
elseif (count($aNameAttCodes) == 1)
{
// New style...
$sNameAttCode = "'$aNameAttCodes[0]'";
}
else
{
$sNameAttCode = "''";