mirror of
https://github.com/smarty-php/smarty.git
synced 2026-05-05 04:04:10 +02:00
- bugfix allow function plugins with name ending with 'close' https://github.com/smarty-php/smarty/issues/52
This commit is contained in:
@@ -638,10 +638,20 @@ abstract class Smarty_Internal_TemplateCompilerBase
|
||||
if (isset($this->smarty->registered_plugins[Smarty::PLUGIN_BLOCK][$base_tag]) || isset($this->default_handler_plugins[Smarty::PLUGIN_BLOCK][$base_tag])) {
|
||||
return $this->callTagCompiler('private_registered_block', $args, $parameter, $tag);
|
||||
}
|
||||
// registered function tag ?
|
||||
if (isset($this->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION][$tag])) {
|
||||
return $this->callTagCompiler('private_registered_function', $args, $parameter, $tag);
|
||||
}
|
||||
// block plugin?
|
||||
if ($function = $this->getPlugin($base_tag, Smarty::PLUGIN_BLOCK)) {
|
||||
return $this->callTagCompiler('private_block_plugin', $args, $parameter, $tag, $function);
|
||||
}
|
||||
// function plugin?
|
||||
if ($function = $this->getPlugin($tag, Smarty::PLUGIN_FUNCTION)) {
|
||||
if (!isset($this->smarty->security_policy) || $this->smarty->security_policy->isTrustedTag($tag, $this)) {
|
||||
return $this->callTagCompiler('private_function_plugin', $args, $parameter, $tag, $function);
|
||||
}
|
||||
}
|
||||
// registered compiler plugin ?
|
||||
if (isset($this->smarty->registered_plugins[Smarty::PLUGIN_COMPILER][$tag])) {
|
||||
// if compiler function plugin call it now
|
||||
|
||||
Reference in New Issue
Block a user