summaryrefslogtreecommitdiff
path: root/framework/Web/UI
diff options
context:
space:
mode:
authorxue <>2007-03-06 19:35:51 +0000
committerxue <>2007-03-06 19:35:51 +0000
commitf48f2d97a1793103f7c99303c1309c2a22a5a8ca (patch)
treee474aa1de72a7616f6054be1bdfcfe24d2e8404d /framework/Web/UI
parent34cae62180fe350a5168502bdc479f8e40e6e4fa (diff)
Fixed template expression bug.
Diffstat (limited to 'framework/Web/UI')
-rw-r--r--framework/Web/UI/TTemplateManager.php11
1 files changed, 3 insertions, 8 deletions
diff --git a/framework/Web/UI/TTemplateManager.php b/framework/Web/UI/TTemplateManager.php
index 1f2bca68..a68b4c51 100644
--- a/framework/Web/UI/TTemplateManager.php
+++ b/framework/Web/UI/TTemplateManager.php
@@ -854,7 +854,7 @@ class TTemplate extends TApplicationComponent implements ITemplate
*/
protected function parseAttribute($value)
{
- if(($n=preg_match_all('/<%[#=\\$].*?%>|<%\\[.*?\\]%>/msS',$value,$matches,PREG_OFFSET_CAPTURE))>0)
+ if(($n=preg_match_all('/<%[#=].*?%>/msS',$value,$matches,PREG_OFFSET_CAPTURE))>0)
{
$isDataBind=false;
$textStart=0;
@@ -869,12 +869,7 @@ class TTemplate extends TApplicationComponent implements ITemplate
$isDataBind=true;
if($offset>$textStart)
$expr.=".'".strtr(substr($value,$textStart,$offset-$textStart),array("'"=>"\\'","\\"=>"\\\\"))."'";
- if($token[2]==='[') // localize
- $expr.='.(Prado::localize(\''.strtr(trim(substr($token,3,$length-6)),array("'"=>"\\'","\\"=>"\\\\")).'\'))';
- else if($token[2]==='$') // parameter
- $expr.='.(Prado::getApplication()->getParameters()->itemAt(\''.strtr(trim(substr($token,3,$length-5)),array("'"=>"\\'","\\"=>"\\\\")).'\'))';
- else // expression
- $expr.='.('.substr($token,3,$length-5).')';
+ $expr.='.('.substr($token,3,$length-5).')';
$textStart=$offset+$length;
}
$length=strlen($value);
@@ -1061,4 +1056,4 @@ class TTemplate extends TApplicationComponent implements ITemplate
}
}
-?>
+?> \ No newline at end of file