瀏覽代碼

Fixed regression with the display of lists based on class that is not a leaf (aka standalone) class

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@1299 a333f486-631f-4898-b8df-5754b55c2be0
romainq 14 年之前
父節點
當前提交
2199cd19fe
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      core/dbobjectset.class.php

+ 7 - 0
core/dbobjectset.class.php

@@ -107,7 +107,14 @@ class DBObjectSet
 				// Add the friendly name anytime
 				$oFriendlyNameAttDef = MetaModel::GetAttributeDef($sClass, 'friendlyname');
 				$aAttToLoadWithAttDef[$sClassAlias]['friendlyname'] = $oFriendlyNameAttDef;
+
+				// Make sure that the final class is requested anytime, whatever the specification (needed for object construction!)
+				if (!MetaModel::IsStandaloneClass($sClass) && !array_key_exists('finalclass', $aAttList))
+				{
+					$aAttToLoadWithAttDef[$sClassAlias]['finalclass'] = MetaModel::GetAttributeDef($sClass, 'finalclass');
+				}
 			}
+
 			$this->m_aAttToLoad = $aAttToLoadWithAttDef;
 		}
 	}