From 7ef5c8ddd73ac6341da12dc85459268fc10c2981 Mon Sep 17 00:00:00 2001 From: Romain Quetiez Date: Tue, 3 Apr 2012 10:07:38 +0000 Subject: [PATCH] Compiler: allow optional zlists SVN:trunk[1935] --- setup/compiler.class.inc.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/setup/compiler.class.inc.php b/setup/compiler.class.inc.php index 4cad0892f..faee790a5 100644 --- a/setup/compiler.class.inc.php +++ b/setup/compiler.class.inc.php @@ -667,11 +667,14 @@ EOF; $sZlists = ''; foreach ($aListRef as $sListCode => $sListTag) { - $oListNode = $this->GetUniqueElement($oPresentation, $sListTag); - $aAttributes = $this->GetNodeAsArrayOfItems($oListNode); - - $sZAttributes = var_export($aAttributes, true); - $sZlists .= " MetaModel::Init_SetZListItems('$sListCode', $sZAttributes);\n"; + $oListNode = $this->GetOptionalElement($oPresentation, $sListTag); + if ($oListNode) + { + $aAttributes = $this->GetNodeAsArrayOfItems($oListNode); + + $sZAttributes = var_export($aAttributes, true); + $sZlists .= " MetaModel::Init_SetZListItems('$sListCode', $sZAttributes);\n"; + } } // Methods