diff options
author | xue <> | 2006-06-29 18:40:08 +0000 |
---|---|---|
committer | xue <> | 2006-06-29 18:40:08 +0000 |
commit | 13da19dbe5d419852b9d3de982e68f6d5883dd1e (patch) | |
tree | 16a4f629d1ff61c6b06adada1b7c5844410bd422 /framework | |
parent | e79837c9e8cb3a0f1eb2c0b49503c81736a8fce6 (diff) |
A minor performance tune-up.
Diffstat (limited to 'framework')
-rw-r--r-- | framework/Web/UI/TTemplateManager.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/framework/Web/UI/TTemplateManager.php b/framework/Web/UI/TTemplateManager.php index a68e8762..1fde4acc 100644 --- a/framework/Web/UI/TTemplateManager.php +++ b/framework/Web/UI/TTemplateManager.php @@ -629,7 +629,7 @@ class TTemplate extends TApplicationComponent implements ITemplate if($matchStart>$textStart)
{
$value=substr($input,$textStart,$matchStart-$textStart);
- if(strrpos($prop,'template')===strlen($prop)-8)
+ if(substr($prop,-8,8)==='template')
$value=$this->parseTemplateProperty($value,$textStart);
else
$value=$this->parseAttribute($value);
@@ -650,7 +650,7 @@ class TTemplate extends TApplicationComponent implements ITemplate }
else if(strpos($str,'<!--')===0) // comments
{
- if(strrpos($str,'--!>')===strlen($str)-4) // template comments
+ if(substr($str,-4,4)==='--!>') // template comments
{
if($expectPropEnd)
throw new TConfigurationException('template_comments_forbidden');
@@ -748,7 +748,7 @@ class TTemplate extends TApplicationComponent implements ITemplate if(isset($attributes[$name]))
throw new TConfigurationException('template_property_duplicated',$name);
$value=$match[2][0];
- if(strrpos($name,'template')===strlen($name)-8)
+ if(substr($name,-8,8)==='template')
{
if($value[0]==='\'' || $value[0]==='"')
$attributes[$name]=$this->parseTemplateProperty(substr($value,1,strlen($value)-2),$match[2][1]+1);
|