diff --git a/change_log.txt b/change_log.txt index 2056bf65..09185b6f 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,4 +1,7 @@  ===== 3.1.22-dev ===== (xx.xx.2015) + 28.04.2015 + - bugfix plugins of merged subtemplates not loaded in 3.1.22-dev (forum topic 25508) 2nd fix + 28.04.2015 - bugfix plugins of merged subtemplates not loaded in 3.1.22-dev (forum topic 25508) diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 0a810f02..f67c1861 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -111,7 +111,7 @@ class Smarty extends Smarty_Internal_TemplateBase /** * smarty version */ - const SMARTY_VERSION = '3.1.22-dev/20'; + const SMARTY_VERSION = '3.1.22-dev/21'; /** * define variable scopes diff --git a/libs/sysplugins/smarty_internal_compile_include.php b/libs/sysplugins/smarty_internal_compile_include.php index a71575cb..9c7aea0d 100644 --- a/libs/sysplugins/smarty_internal_compile_include.php +++ b/libs/sysplugins/smarty_internal_compile_include.php @@ -211,7 +211,20 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase } $compiler->parent_compiler->mergedSubTemplatesCode[$tpl->properties['unifunc']] = $compiled_code; $has_compiled_template = true; - $compiler->template->required_plugins = array_merge_recursive($compiler->template->required_plugins, $tpl->required_plugins); + if (!empty($tpl->required_plugins['compiled'])) { + foreach ($tpl->required_plugins['compiled'] as $name => $callBack) { + if (!isset($compiler->template->required_plugins['compiled'][$name])) { + $compiler->template->required_plugins['compiled'][$name] = $callBack; + } + } + } + if (!empty($tpl->required_plugins['nocache'])) { + foreach ($tpl->required_plugins['nocache'] as $name => $callBack) { + if (!isset($compiler->template->required_plugins['nocache'][$name])) { + $compiler->template->required_plugins['nocache'][$name] = $callBack; + } + } + } unset ($tpl); } } else {