mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-20 07:42:17 +02:00
Fixed Trac #156: make sure the hierarchical ZLists are supported everywhere (final cleanup).
SVN:trunk[1118]
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user