- fixed access of special smarty variables from included template

This commit is contained in:
Uwe.Tews
2009-04-23 13:32:45 +00:00
parent d991f96423
commit 1ee0747801
4 changed files with 5 additions and 1 deletions

View File

@@ -56,6 +56,7 @@ class Smarty_Internal_Compile_Foreach extends Smarty_Internal_CompileBase {
$output .= " \$_smarty_tpl->tpl_vars['smarty']->value['foreach'][$name]['total'] = \$_smarty_tpl->tpl_vars[$item]->total;\n";
$output .= " \$_smarty_tpl->tpl_vars['smarty']->value['foreach'][$name]['iteration']=0;\n";
$output .= " \$_smarty_tpl->tpl_vars['smarty']->value['foreach'][$name]['index']=-1;\n";
$output .= " \$_smarty_tpl->tpl_vars['smarty']->scope = 0;\n";
}
$output .= "if (count(\$_from) > 0){\n";
$output .= " foreach (\$_from as \$_smarty_tpl->tpl_vars[$item]->key => \$_smarty_tpl->tpl_vars[$item]->value){\n";