From bbbb5e098e81ed84cf00b9e91ad73b61085b079d Mon Sep 17 00:00:00 2001 From: "Uwe.Tews" Date: Tue, 3 Nov 2009 15:23:18 +0000 Subject: [PATCH] - fixed parser error on objects with special smarty vars --- change_log.txt | 3 +++ libs/sysplugins/smarty_internal_templateparser.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/change_log.txt b/change_log.txt index d76a993e..85c2eb4e 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,3 +1,6 @@ +11/03/2009 +- fixed parser error on objects with special smarty vars + 11/02/2009 - added neq,lte,gte,mod as aliases to if conditions - throw exception on illegal Smarty() constructor calls diff --git a/libs/sysplugins/smarty_internal_templateparser.php b/libs/sysplugins/smarty_internal_templateparser.php index c756a60f..5222e2ad 100644 --- a/libs/sysplugins/smarty_internal_templateparser.php +++ b/libs/sysplugins/smarty_internal_templateparser.php @@ -2294,7 +2294,7 @@ static public $yy_action = array( function yy_r96(){$this->_retvalue = '('.$this->yystack[$this->yyidx + -1]->minor.')'; } #line 2300 "smarty_internal_templateparser.php" #line 398 "smarty_internal_templateparser.y" - function yy_r97(){ if ($this->yystack[$this->yyidx + -1]->minor['var'] == '\'smarty\'') { $this->_retvalue = $this->compiler->compileTag('internal_smarty_var',$this->yystack[$this->yyidx + -1]->minor['index']).$this->yystack[$this->yyidx + 0]->minor;} else { + function yy_r97(){ if ($this->yystack[$this->yyidx + -1]->minor['var'] == '\'smarty\'') { $this->_retvalue = $this->compiler->compileTag('special_smarty_variable',$this->yystack[$this->yyidx + -1]->minor['index']).$this->yystack[$this->yyidx + 0]->minor;} else { $this->_retvalue = '$_smarty_tpl->getVariable('. $this->yystack[$this->yyidx + -1]->minor['var'] .')->value'.$this->yystack[$this->yyidx + -1]->minor['index'].$this->yystack[$this->yyidx + 0]->minor; $this->compiler->tag_nocache=$this->compiler->tag_nocache|$this->template->getVariable(trim($this->yystack[$this->yyidx + -1]->minor['var'],"'"))->nocache;} } #line 2304 "smarty_internal_templateparser.php" #line 401 "smarty_internal_templateparser.y"