diff --git a/change_log.txt b/change_log.txt index 0a4f6d49..3e1f1d8c 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,6 +1,10 @@  ===== 3.1.22-dev ===== (xx.xx.2015) + 14.03.2015 + - bugfix template functions defined with {function} in an included subtemplate could not be called in nocache + mode with {call... nocache} if the subtemplate had it's own cache file {forum 25452} + 10.03.2015 - - bugfix {include ... nocache} with variable file or compile_id attribute was not executed in nocache mode. + - bugfix {include ... nocache} whith variable file or compile_id attribute was not executed in nocache mode. 12.02.2015 - bugfix multiple Smarty::fetch() of same template when $smarty->merge_compiled_includes = true; could cause function already defined error diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index ac2a0b04..c578e604 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/9'; + const SMARTY_VERSION = '3.1.22-dev/10'; /** * define variable scopes diff --git a/libs/sysplugins/smarty_internal_template.php b/libs/sysplugins/smarty_internal_template.php index 0747aa03..49a70c0c 100644 --- a/libs/sysplugins/smarty_internal_template.php +++ b/libs/sysplugins/smarty_internal_template.php @@ -246,14 +246,7 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase if ($this->parent instanceof Smarty_Internal_Template) { $this->parent->properties['file_dependency'] = array_merge($this->parent->properties['file_dependency'], $this->properties['file_dependency']); $this->parent->properties['tpl_function'] = array_merge($this->parent->properties['tpl_function'], $this->properties['tpl_function']); - foreach ($this->required_plugins as $code => $tmp1) { - foreach ($tmp1 as $name => $tmp) { - foreach ($tmp as $type => $data) { - $this->parent->required_plugins[$code][$name][$type] = $data; - } - } - } - } + } if ($this->smarty->debugging) { Smarty_Internal_Debug::end_render($this); } @@ -323,6 +316,16 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase Smarty_Internal_Debug::end_template($this); } // return fetched content + if ($this->parent instanceof Smarty_Internal_Template) { + $this->parent->properties['tpl_function'] = array_merge($this->parent->properties['tpl_function'], $this->properties['tpl_function']); + foreach ($this->required_plugins as $code => $tmp1) { + foreach ($tmp1 as $name => $tmp) { + foreach ($tmp as $type => $data) { + $this->parent->required_plugins[$code][$name][$type] = $data; + } + } + } + } return $content; } }