- bugfix {counter} and {cycle} plugin assigned result to smarty variable not in local(template) scope

- bugfix templates containing just {strip} {/strip} tags did produce an error
This commit is contained in:
Uwe.Tews
2010-09-07 16:24:34 +00:00
parent 96e3d9937a
commit a2f50cebd4
4 changed files with 876 additions and 867 deletions

View File

@@ -16,9 +16,10 @@
* (Smarty online manual)
* @param array parameters
* @param Smarty
* @param object $template template object
* @return string|null
*/
function smarty_function_counter($params, $smarty)
function smarty_function_counter($params, $smarty, $template)
{
static $counters = array();
@@ -42,7 +43,7 @@ function smarty_function_counter($params, $smarty)
}
if (isset($counter['assign'])) {
$smarty->assign($counter['assign'], $counter['count']);
$template->assign($counter['assign'], $counter['count']);
}
if (isset($params['print'])) {