Fixed Trac #156: make sure the hierarchical ZLists are supported everywhere (final cleanup).

SVN:trunk[1118]
This commit is contained in:
Denis Flaven
2011-03-08 11:19:38 +00:00
parent 089407119b
commit 49e05acd4b
4 changed files with 4 additions and 4 deletions

View File

@@ -227,7 +227,7 @@ $sJSHandlerCode
// Now use the dependencies between the fields to order them
// Start from the order of the 'details'
$aList = MetaModel::GetZListItems($this->m_sClass, 'details');
$aList = MetaModel::FlattenZlist(MetaModel::GetZListItems($this->m_sClass, 'details'));
$index = 0;
$aOrder = array();
foreach($aFields as $sAttCode => $void)

View File

@@ -840,7 +840,7 @@ abstract class MetaModel
public static function IsAttributeInZList($sClass, $sListCode, $sAttCodeOrFltCode, $sGroup = null)
{
$aZList = self::GetZListItems($sClass, $sListCode);
$aZList = self::FlattenZlist(self::GetZListItems($sClass, $sListCode));
if (!$sGroup)
{
return (in_array($sAttCodeOrFltCode, $aZList));

View File

@@ -1676,7 +1676,7 @@ class SynchroReplica extends DBObject implements iDisplay
$sClass = get_class($this);
$oPage->add('<fieldset>');
$oPage->add('<legend>'.Dict::S('Core:SynchroReplica:PrivateDetails').'</legend>');
$aZList = MetaModel::GetZListItems($sClass, 'details');
$aZList = MetaModel::FlattenZlist(MetaModel::GetZListItems($sClass, 'details'));
foreach( $aZList as $sAttCode)
{
$sDisplayValue = $this->GetAsHTML($sAttCode);

View File

@@ -531,7 +531,7 @@ class TestMyBizModel extends TestBizModel
foreach (MetaModel::GetSubclasses("cmdbObjectHomeMade") as $sKlass)
{
$aItems = MetaModel::GetZListItems($sKlass, $sListCode);
$aItems = MetaModel::FlattenZlist(MetaModel::GetZListItems($sKlass, $sListCode));
if (count($aItems) == 0) continue;
echo "$sKlass - $sListCode : {".implode(", ", $aItems)."}</br>\n";