Browse Source

fix template's {{ for }} variable lookup

pull/1/head
Fabio Comuni 11 years ago
parent
commit
e14d5851a7
  1. 3
      include/template_processor.php

3
include/template_processor.php

@ -58,7 +58,8 @@
list($keyname, $varname) = explode("=>",$m[1]);
if (is_null($varname)) { $varname=$keyname; $keyname=""; }
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="";
if (!is_array($vals)) return $ret;
foreach ($vals as $k=>$v){

Loading…
Cancel
Save