From b680e71693696a7b5280787ccd084cf860bcf989 Mon Sep 17 00:00:00 2001 From: xue <> Date: Thu, 31 Aug 2006 01:33:23 +0000 Subject: Fixed #352. --- framework/Web/UI/TTemplateManager.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/framework/Web/UI/TTemplateManager.php b/framework/Web/UI/TTemplateManager.php index b3317709..5d5dbc5e 100644 --- a/framework/Web/UI/TTemplateManager.php +++ b/framework/Web/UI/TTemplateManager.php @@ -286,8 +286,11 @@ class TTemplate extends TApplicationComponent implements ITemplate $directChildren=array(); foreach($this->_tpl as $key=>$object) { - $parent=isset($controls[$object[0]])?$controls[$object[0]]:$tplControl; - if(($parent instanceof TControl) && !$parent->getAllowChildControls()) + if($object[0]===-1) + $parent=$tplControl; + else if(isset($controls[$object[0]])) + $parent=$controls[$object[0]]; + else continue; if(isset($object[2])) // component { -- cgit v1.2.3