summaryrefslogtreecommitdiff
path: root/framework/Web/UI/TTemplateManager.php
diff options
context:
space:
mode:
authorxue <>2006-04-09 01:50:08 +0000
committerxue <>2006-04-09 01:50:08 +0000
commitd8122a0f98137822b0ea20f7602d105fcb2fe962 (patch)
tree7cd4b748842c1bf23a5da770d082f84267d4de24 /framework/Web/UI/TTemplateManager.php
parentc370ddb843c418f550879c2edc0aac0fe90a1b2d (diff)
Fixed a few bugs in TOutputCache. Documentation for TOutputCache is completed.
Diffstat (limited to 'framework/Web/UI/TTemplateManager.php')
-rw-r--r--framework/Web/UI/TTemplateManager.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/framework/Web/UI/TTemplateManager.php b/framework/Web/UI/TTemplateManager.php
index fa4cbcbf..73a336c8 100644
--- a/framework/Web/UI/TTemplateManager.php
+++ b/framework/Web/UI/TTemplateManager.php
@@ -262,8 +262,11 @@ class TTemplate extends TApplicationComponent implements ITemplate
$controls=array();
foreach($this->_tpl as $key=>$object)
{
- $parent=isset($controls[$object[0]])?$controls[$object[0]]:$tplControl;
- if(!$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
{
@@ -271,7 +274,6 @@ class TTemplate extends TApplicationComponent implements ITemplate
$properties=&$object[2];
if($component instanceof TControl)
{
- $controls[$key]=$component;
$component->setTemplateControl($tplControl);
if(isset($properties['id']))
{
@@ -292,6 +294,8 @@ class TTemplate extends TApplicationComponent implements ITemplate
foreach($properties as $name=>$value)
$this->configureControl($component,$name,$value);
$component->createdOnTemplate($parent);
+ if($component->getAllowChildControls())
+ $controls[$key]=$component;
}
else if($component instanceof TComponent)
{