mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-03 13:51:36 +01:00
update plugins to return values instead of echo, fix config file cache
to include global config variables in cache file
This commit is contained in:
@@ -42,8 +42,11 @@ function smarty_function_counter($params, &$smarty)
|
||||
$smarty->assign($assign, $count[$name]);
|
||||
}
|
||||
|
||||
if ($printval[$name])
|
||||
echo $count[$name];
|
||||
if ($printval[$name]) {
|
||||
$retval = $count[$name];
|
||||
} else {
|
||||
$retval = null;
|
||||
}
|
||||
|
||||
if (isset($skip))
|
||||
$skipval[$name] = $skip;
|
||||
@@ -59,6 +62,9 @@ function smarty_function_counter($params, &$smarty)
|
||||
$count[$name] -= $skipval[$name];
|
||||
else
|
||||
$count[$name] += $skipval[$name];
|
||||
|
||||
return $retval;
|
||||
|
||||
}
|
||||
|
||||
/* vim: set expandtab: */
|
||||
|
||||
Reference in New Issue
Block a user