mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-17 06:18:44 +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
|
||||
*
|
||||
@@ -6551,8 +6551,9 @@ class AttributeExternalField extends AttributeDefinition
|
||||
*/
|
||||
public function GetLabel($sDefault = null)
|
||||
{
|
||||
$sLabel = parent::GetLabel(null);
|
||||
if (!is_null($sLabel))
|
||||
$sLabelDefaultValue = '';
|
||||
$sLabel = parent::GetLabel($sLabelDefaultValue);
|
||||
if ($sLabelDefaultValue !== $sLabel)
|
||||
{
|
||||
return $sLabel;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user