mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
- enhancement the default plugin handler can now also resolve undefined modifier (Smarty::PLUGIN_MODIFIER)
(Issue 85)
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
===== trunk =====
|
||||
02.03.2012
|
||||
- enhancement the default plugin handler can now also resolve undefined modifier (Smarty::PLUGIN_MODIFIER)
|
||||
(Issue 85)
|
||||
|
||||
===== Smarty-3.1.8 =====
|
||||
19.02.2012
|
||||
- bugfix {include} could result in a fatal error if used in appended or prepended nested {block} tags
|
||||
|
@@ -69,6 +69,12 @@ class Smarty_Internal_Compile_Private_Modifier extends Smarty_Internal_CompileBa
|
||||
if (!is_object($compiler->smarty->security_policy) || $compiler->smarty->security_policy->isTrustedPhpModifier($modifier, $compiler)) {
|
||||
$output = "{$modifier}({$params})";
|
||||
}
|
||||
} else if (is_callable($compiler->smarty->default_plugin_handler_func) && $compiler->getPluginFromDefaultHandler($modifier, Smarty::PLUGIN_MODIFIER) && isset($compiler->default_handler_plugins[Smarty::PLUGIN_MODIFIER][$modifier])) {
|
||||
$function = $compiler->default_handler_plugins[Smarty::PLUGIN_MODIFIER][$modifier][0];
|
||||
// check if modifier allowed
|
||||
if (!is_object($compiler->smarty->security_policy) || $compiler->smarty->security_policy->isTrustedModifier($modifier, $compiler)) {
|
||||
$output = "{$function}({$params})";
|
||||
}
|
||||
} else {
|
||||
$compiler->trigger_template_error("unknown modifier \"" . $modifier . "\"", $compiler->lex->taglineno);
|
||||
}
|
||||
|
Reference in New Issue
Block a user