#1249 Fixed regression introduced in [r3916] (iTop 2.3.0 beta): AttributeHTML not working if the sql column name differs from the attribute code

SVN:trunk[4196]
This commit is contained in:
Romain Quetiez
2016-06-10 14:23:31 +00:00
parent 09fad78952
commit e48a1b1645

View File

@@ -3014,7 +3014,7 @@ class AttributeHTML extends AttributeLongText
public function GetSQLColumns($bFullSpec = false)
{
$aColumns = array();
$aColumns[$this->GetCode()] = $this->GetSQLCol();
$aColumns[$this->Get('sql')] = $this->GetSQLCol();
if ($this->GetOptional('format', null) != null )
{
// Add the extra column only if the property 'format' is specified for the attribute
@@ -3114,7 +3114,7 @@ class AttributeTemplateHTML extends AttributeText
public function GetSQLColumns($bFullSpec = false)
{
$aColumns = array();
$aColumns[$this->GetCode()] = $this->GetSQLCol();
$aColumns[$this->Get('sql')] = $this->GetSQLCol();
if ($this->GetOptional('format', null) != null )
{
// Add the extra column only if the property 'format' is specified for the attribute