mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
- bugfix allow function plugins with name ending with 'close' https://github.com/smarty-php/smarty/issues/52
This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
- update {include_php} with new realpath handling
|
- update {include_php} with new realpath handling
|
||||||
- move $smarty->loadPlugin() into extension
|
- move $smarty->loadPlugin() into extension
|
||||||
- minor compiler optimizations
|
- minor compiler optimizations
|
||||||
|
- bugfix allow function plugins with name ending with 'close' https://github.com/smarty-php/smarty/issues/52
|
||||||
|
|
||||||
19.06.2015
|
19.06.2015
|
||||||
- improvement allow closures as callback at $smarty->registerFilter() https://github.com/smarty-php/smarty/issues/59
|
- improvement allow closures as callback at $smarty->registerFilter() https://github.com/smarty-php/smarty/issues/59
|
||||||
|
@@ -111,7 +111,7 @@ class Smarty extends Smarty_Internal_TemplateBase
|
|||||||
/**
|
/**
|
||||||
* smarty version
|
* smarty version
|
||||||
*/
|
*/
|
||||||
const SMARTY_VERSION = '3.1.28-dev/9';
|
const SMARTY_VERSION = '3.1.28-dev/10';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* define variable scopes
|
* define variable scopes
|
||||||
|
@@ -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])) {
|
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);
|
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?
|
// block plugin?
|
||||||
if ($function = $this->getPlugin($base_tag, Smarty::PLUGIN_BLOCK)) {
|
if ($function = $this->getPlugin($base_tag, Smarty::PLUGIN_BLOCK)) {
|
||||||
return $this->callTagCompiler('private_block_plugin', $args, $parameter, $tag, $function);
|
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 ?
|
// registered compiler plugin ?
|
||||||
if (isset($this->smarty->registered_plugins[Smarty::PLUGIN_COMPILER][$tag])) {
|
if (isset($this->smarty->registered_plugins[Smarty::PLUGIN_COMPILER][$tag])) {
|
||||||
// if compiler function plugin call it now
|
// if compiler function plugin call it now
|
||||||
|
Reference in New Issue
Block a user