summaryrefslogtreecommitdiff
path: root/framework/Web/UI/TTemplateManager.php
diff options
context:
space:
mode:
authorxue <>2006-02-15 20:26:03 +0000
committerxue <>2006-02-15 20:26:03 +0000
commitab781af4385b77943975394eba606cd38f1e4fb1 (patch)
treef330817bfa1b1c2d92890db86d1b99e68a76ae5f /framework/Web/UI/TTemplateManager.php
parentba1933d83922e3eb42e93b3fa476f4614a58aebc (diff)
Added duplicate property configuration check.
Diffstat (limited to 'framework/Web/UI/TTemplateManager.php')
-rw-r--r--framework/Web/UI/TTemplateManager.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/framework/Web/UI/TTemplateManager.php b/framework/Web/UI/TTemplateManager.php
index 59d15698..4c71de51 100644
--- a/framework/Web/UI/TTemplateManager.php
+++ b/framework/Web/UI/TTemplateManager.php
@@ -568,6 +568,8 @@ class TTemplate extends TComponent implements ITemplate
$value=$this->parseAttribute($value);
$type=$tpl[$container][1];
$this->validateAttributes($type,array($prop=>$value));
+ if(isset($tpl[$container][2][$prop]))
+ throw new TConfigurationException('template_property_duplicated',$prop);
$tpl[$container][2][$prop]=$value;
$textStart=$matchEnd+1;
}
@@ -630,6 +632,8 @@ class TTemplate extends TComponent implements ITemplate
{
$match=&$matches[$i];
$name=strtolower($match[1][0]);
+ if(isset($attributes[$name]))
+ throw new TConfigurationException('template_property_duplicated',$name);
$value=$match[2][0];
if(strrpos($name,'template')===strlen($name)-8)
{