- bugfix the default plugin handler did create wrong compiled code for static class methods

from external script files (issue 108)
This commit is contained in:
uwe.tews@googlemail.com
2012-07-18 22:31:56 +00:00
parent c6f25b466d
commit 942db98f0c
2 changed files with 14 additions and 2 deletions

View File

@@ -1,4 +1,8 @@
===== trunk ===== ===== trunk =====
19.07.2012
- bugfix the default plugin handler did create wrong compiled code for static class methods
from external script files (issue 108)
===== Smarty-3.1.11 ===== ===== Smarty-3.1.11 =====
30.06.2012 30.06.2012
- bugfix {block.. hide} did not work as nested child (Forum Topic 22216) - bugfix {block.. hide} did not work as nested child (Forum Topic 22216)

View File

@@ -344,7 +344,11 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase {
foreach ($this->required_plugins['compiled'] as $tmp) { foreach ($this->required_plugins['compiled'] as $tmp) {
foreach ($tmp as $data) { foreach ($tmp as $data) {
$file = addslashes($data['file']); $file = addslashes($data['file']);
$plugins_string .= "if (!is_callable('{$data['function']}')) include '{$file}';\n"; if (is_Array($data['function'])){
$plugins_string .= "if (!is_callable(array('{$data['function'][0]}','{$data['function'][1]}'))) include '{$file}';\n";
} else {
$plugins_string .= "if (!is_callable('{$data['function']}')) include '{$file}';\n";
}
} }
} }
$plugins_string .= '?>'; $plugins_string .= '?>';
@@ -355,7 +359,11 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase {
foreach ($this->required_plugins['nocache'] as $tmp) { foreach ($this->required_plugins['nocache'] as $tmp) {
foreach ($tmp as $data) { foreach ($tmp as $data) {
$file = addslashes($data['file']); $file = addslashes($data['file']);
$plugins_string .= addslashes("if (!is_callable('{$data['function']}')) include '{$file}';\n"); if (is_Array($data['function'])){
$plugins_string .= addslashes("if (!is_callable(array('{$data['function'][0]}','{$data['function'][1]}'))) include '{$file}';\n");
} else {
$plugins_string .= addslashes("if (!is_callable('{$data['function']}')) include '{$file}';\n");
}
} }
} }
$plugins_string .= "?>/*/%%SmartyNocache:{$this->properties['nocache_hash']}%%*/';?>\n"; $plugins_string .= "?>/*/%%SmartyNocache:{$this->properties['nocache_hash']}%%*/';?>\n";