fix handling of assign inside {insert}-tags

This commit is contained in:
messju
2003-11-11 22:46:13 +00:00
parent 8a3bf9e0c7
commit 9d4a0bcb07
2 changed files with 7 additions and 1 deletions

1
NEWS
View File

@@ -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

View File

@@ -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) {