mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-07 03:44:26 +02:00
- bugfix for plugins defined in the script as smarty_function_foo
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
12/30/2009
|
||||
- bugfix for plugins defined in the script as smarty_function_foo
|
||||
|
||||
12/29/2009
|
||||
- use sha1() for filepath encoding
|
||||
- updates on nocache_hash handling
|
||||
|
@@ -12,7 +12,7 @@
|
||||
/**
|
||||
* Smarty Internal Plugin Compile Function_Call Class
|
||||
*/
|
||||
class Smarty_Internal_Compile_Private_Function_Call extends Smarty_Internal_CompileBase {
|
||||
class Smarty_Internal_Compile_Call extends Smarty_Internal_CompileBase {
|
||||
/**
|
||||
* Compiles the calls of user defined tags defined by {function}
|
||||
*
|
@@ -118,7 +118,7 @@ class Smarty_Internal_TemplateCompilerBase {
|
||||
if (isset($this->smarty->template_functions[$tag])) {
|
||||
// template defined by {template} tag
|
||||
$args['name'] = $tag;
|
||||
$_output = $this->callTagCompiler('private_function_call', $args);
|
||||
$_output = $this->callTagCompiler('call', $args);
|
||||
}
|
||||
}
|
||||
if ($_output !== false) {
|
||||
@@ -180,7 +180,8 @@ class Smarty_Internal_TemplateCompilerBase {
|
||||
throw new Exception("Plugin \"{$tag}\" not callable");
|
||||
}
|
||||
} else {
|
||||
if ($function = $this->getPlugin($tag, $plugin_type)) {
|
||||
$function = 'smarty_' . $plugin_type . '_' . $tag;
|
||||
if (is_callable($function) || $function = $this->getPlugin($tag, $plugin_type)) {
|
||||
return $this->callTagCompiler('private_' . $plugin_type . '_plugin', $args, $tag, $function);
|
||||
}
|
||||
}
|
||||
@@ -203,7 +204,8 @@ class Smarty_Internal_TemplateCompilerBase {
|
||||
return $this->callTagCompiler('private_registered_block', $args, $tag);
|
||||
}
|
||||
// block plugin?
|
||||
if ($function = $this->getPlugin($base_tag, 'block')) {
|
||||
$function = 'smarty_block_' . $base_tag;
|
||||
if (is_callable($function) || $function = $this->getPlugin($base_tag, 'block')) {
|
||||
return $this->callTagCompiler('private_block_plugin', $args, $tag, $function);
|
||||
}
|
||||
if ($this->smarty->loadPlugin('smarty_compiler_' . $tag)) {
|
||||
|
Reference in New Issue
Block a user