- bugfix escape and wordrap modifier could be compiled into wrong code when used in {nocache}{/nocache}

section but caching is disabled  (Forum Topic 24260)
This commit is contained in:
Uwe.Tews@googlemail.com
2013-04-25 15:20:13 +00:00
parent f074a20ed5
commit 8e2d249233
3 changed files with 6 additions and 2 deletions

View File

@@ -1,4 +1,8 @@
===== trunk ===== ===== trunk =====
25.04.2013
- bugfix escape and wordrap modifier could be compiled into wrong code when used in {nocache}{/nocache}
section but caching is disabled (Forum Topic 24260)
05.04.2013 05.04.2013
- bugfix post filter must not run when compiling inheritance child blocks (Forum Topic 24094) - bugfix post filter must not run when compiling inheritance child blocks (Forum Topic 24094)
- bugfix after the fix for Issue #130 compiler exceptions got double escaped (Forum Topic 24199) - bugfix after the fix for Issue #130 compiler exceptions got double escaped (Forum Topic 24199)

View File

@@ -112,7 +112,7 @@ function smarty_modifiercompiler_escape($params, $compiler)
} }
// could not optimize |escape call, so fallback to regular plugin // could not optimize |escape call, so fallback to regular plugin
if ($compiler->tag_nocache | $compiler->nocache) { if ($compiler->template->caching && ($compiler->tag_nocache | $compiler->nocache)) {
$compiler->template->required_plugins['nocache']['escape']['modifier']['file'] = SMARTY_PLUGINS_DIR .'modifier.escape.php'; $compiler->template->required_plugins['nocache']['escape']['modifier']['file'] = SMARTY_PLUGINS_DIR .'modifier.escape.php';
$compiler->template->required_plugins['nocache']['escape']['modifier']['function'] = 'smarty_modifier_escape'; $compiler->template->required_plugins['nocache']['escape']['modifier']['function'] = 'smarty_modifier_escape';
} else { } else {

View File

@@ -31,7 +31,7 @@ function smarty_modifiercompiler_wordwrap($params, $compiler)
} }
$function = 'wordwrap'; $function = 'wordwrap';
if (Smarty::$_MBSTRING) { if (Smarty::$_MBSTRING) {
if ($compiler->tag_nocache | $compiler->nocache) { if ($compiler->template->caching && ($compiler->tag_nocache | $compiler->nocache)) {
$compiler->template->required_plugins['nocache']['wordwrap']['modifier']['file'] = SMARTY_PLUGINS_DIR .'shared.mb_wordwrap.php'; $compiler->template->required_plugins['nocache']['wordwrap']['modifier']['file'] = SMARTY_PLUGINS_DIR .'shared.mb_wordwrap.php';
$compiler->template->required_plugins['nocache']['wordwrap']['modifier']['function'] = 'smarty_mb_wordwrap'; $compiler->template->required_plugins['nocache']['wordwrap']['modifier']['function'] = 'smarty_mb_wordwrap';
} else { } else {