fix template's {{ for }} variable lookup
This commit is contained in:
parent
a1c59d6011
commit
e14d5851a7
1 changed files with 2 additions and 1 deletions
|
@ -58,7 +58,8 @@
|
||||||
list($keyname, $varname) = explode("=>",$m[1]);
|
list($keyname, $varname) = explode("=>",$m[1]);
|
||||||
if (is_null($varname)) { $varname=$keyname; $keyname=""; }
|
if (is_null($varname)) { $varname=$keyname; $keyname=""; }
|
||||||
if ($m[0]=="" || $varname=="" || is_null($varname)) die("template error: 'for ".$m[0]." as ".$varname."'") ;
|
if ($m[0]=="" || $varname=="" || is_null($varname)) die("template error: 'for ".$m[0]." as ".$varname."'") ;
|
||||||
$vals = $this->r[$m[0]];
|
//$vals = $this->r[$m[0]];
|
||||||
|
$vals = $this->_get_var($m[0]);
|
||||||
$ret="";
|
$ret="";
|
||||||
if (!is_array($vals)) return $ret;
|
if (!is_array($vals)) return $ret;
|
||||||
foreach ($vals as $k=>$v){
|
foreach ($vals as $k=>$v){
|
||||||
|
|
Loading…
Reference in a new issue