diff --git a/NEWS b/NEWS index cae02dd9..8e075d7d 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,4 @@ + - fix handling of assign inside {insert}-tags (messju) - fix handling if [...] inside triple-quotes in config-files (messju) - fix handling of simple-math-operators inside modifiers (Dominik, messju) - fix handling of trailing-slashes in open_basedir in diff --git a/libs/core/core.process_cached_inserts.php b/libs/core/core.process_cached_inserts.php index 2a4994ff..0e368fdd 100644 --- a/libs/core/core.process_cached_inserts.php +++ b/libs/core/core.process_cached_inserts.php @@ -45,7 +45,12 @@ function smarty_core_process_cached_inserts($params, &$smarty) } $function_name = $smarty->_plugins['insert'][$name][0]; - $replace = $function_name($args, $smarty); + if (empty($args['assign'])) { + $replace = $function_name($args, $smarty); + } else { + $smarty->assign($args['assign'], $function_name($args, $smarty)); + $replace = ''; + } $params['results'] = str_replace($cached_inserts[$i], $replace, $params['results']); if ($smarty->debugging) {