mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 19:04:27 +02:00
fix handling of assign inside {insert}-tags
This commit is contained in:
1
NEWS
1
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 if [...] inside triple-quotes in config-files (messju)
|
||||||
- fix handling of simple-math-operators inside modifiers (Dominik, messju)
|
- fix handling of simple-math-operators inside modifiers (Dominik, messju)
|
||||||
- fix handling of trailing-slashes in open_basedir in
|
- fix handling of trailing-slashes in open_basedir in
|
||||||
|
@@ -45,7 +45,12 @@ function smarty_core_process_cached_inserts($params, &$smarty)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$function_name = $smarty->_plugins['insert'][$name][0];
|
$function_name = $smarty->_plugins['insert'][$name][0];
|
||||||
|
if (empty($args['assign'])) {
|
||||||
$replace = $function_name($args, $smarty);
|
$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']);
|
$params['results'] = str_replace($cached_inserts[$i], $replace, $params['results']);
|
||||||
if ($smarty->debugging) {
|
if ($smarty->debugging) {
|
||||||
|
Reference in New Issue
Block a user