mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 23:32:17 +02:00
N°2174 External field label retrieval : fix default value
\AttributeDefinition::GetLabel with default null was returning att code !! Added PHPDoc and changed default value
This commit is contained in:
@@ -512,7 +512,7 @@ abstract class AttributeDefinition
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string|null $sDefault
|
* @param string|null $sDefault if null, will return the attribute code replacing "_" by " "
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*
|
*
|
||||||
@@ -6551,8 +6551,9 @@ class AttributeExternalField extends AttributeDefinition
|
|||||||
*/
|
*/
|
||||||
public function GetLabel($sDefault = null)
|
public function GetLabel($sDefault = null)
|
||||||
{
|
{
|
||||||
$sLabel = parent::GetLabel(null);
|
$sLabelDefaultValue = '';
|
||||||
if (!is_null($sLabel))
|
$sLabel = parent::GetLabel($sLabelDefaultValue);
|
||||||
|
if ($sLabelDefaultValue !== $sLabel)
|
||||||
{
|
{
|
||||||
return $sLabel;
|
return $sLabel;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user