- bugfix for obtaining plugins which must be included (related to change of 12/30/2009)

This commit is contained in:
Uwe.Tews
2010-01-01 12:07:36 +00:00
parent 72219be200
commit 8c93e0765a
2 changed files with 9 additions and 8 deletions

View File

@@ -1,3 +1,6 @@
01/01/2009
- bugfix for obtaining plugins which must be included (related to change of 12/30/2009)
12/31/2009
- optimization of generated code for doublequoted strings containing variables
- rewrite of {function} tag handling

View File

@@ -180,8 +180,7 @@ class Smarty_Internal_TemplateCompilerBase {
throw new Exception("Plugin \"{$tag}\" not callable");
}
} else {
$function = 'smarty_' . $plugin_type . '_' . $tag;
if (is_callable($function) || $function = $this->getPlugin($tag, $plugin_type)) {
if ($function = $this->getPlugin($tag, $plugin_type)) {
return $this->callTagCompiler('private_' . $plugin_type . '_plugin', $args, $tag, $function);
}
}
@@ -204,8 +203,7 @@ class Smarty_Internal_TemplateCompilerBase {
return $this->callTagCompiler('private_registered_block', $args, $tag);
}
// block plugin?
$function = 'smarty_block_' . $base_tag;
if (is_callable($function) || $function = $this->getPlugin($base_tag, 'block')) {
if ($function = $this->getPlugin($base_tag, 'block')) {
return $this->callTagCompiler('private_block_plugin', $args, $tag, $function);
}
if ($this->smarty->loadPlugin('smarty_compiler_' . $tag)) {
@@ -307,10 +305,10 @@ class Smarty_Internal_TemplateCompilerBase {
}
return $plugin;
/* } else {
throw new Exception("Plugin {$type} \"{$plugin_name}\" not callable");
}
*/
}
if (is_callable($plugin)) {
// plugin function is defined in the script
return $plugin;
}
return false;
}