소스 검색

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

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@4196 a333f486-631f-4898-b8df-5754b55c2be0
romainq 9 년 전
부모
커밋
df9a5ec014
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      core/attributedef.class.inc.php

+ 2 - 2
core/attributedef.class.inc.php

@@ -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