mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 10:54:27 +02:00
- bugfix the default plugin handler did not allow static class methods for modifier (issue 85)
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
===== trunk =====
|
||||
25.06.2012
|
||||
- bugfix the default plugin handler did not allow static class methods for modifier (issue 85)
|
||||
|
||||
24.06.2012
|
||||
- bugfix escape modifier support for PHP < 5.2.3 (Forum Topic 21176)
|
||||
|
||||
|
@@ -108,7 +108,15 @@ class Smarty_Internal_Compile_Private_Modifier extends Smarty_Internal_CompileBa
|
||||
$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})";
|
||||
if (!is_array($function)) {
|
||||
$output = "{$function}({$params})";
|
||||
} else {
|
||||
if (is_object($function[0])) {
|
||||
$output = '$_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER][\'' . $modifier . '\'][0][0]->' . $function[1] . '(' . $params . ')';
|
||||
} else {
|
||||
$output = $function[0] . '::' . $function[1] . '(' . $params . ')';
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isset($compiler->template->required_plugins['nocache'][$modifier][Smarty::PLUGIN_MODIFIER]['file']) || isset($compiler->template->required_plugins['compiled'][$modifier][Smarty::PLUGIN_MODIFIER]['file'])) {
|
||||
// was a plugin
|
||||
|
Reference in New Issue
Block a user