From 3197470ca5db7b0c48245f856c865e0e6163c701 Mon Sep 17 00:00:00 2001 From: "Uwe.Tews" Date: Tue, 11 May 2010 17:01:08 +0000 Subject: [PATCH] - reverted the change 0f 30/04/2010. With the exception of forward references template functions can be again called by a standard tag. --- change_log.txt | 1 + libs/sysplugins/smarty_internal_templatecompilerbase.php | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/change_log.txt b/change_log.txt index 5635ff05..1dd63df1 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,5 +1,6 @@ 11/05/2010 - bugfix make sure that the cache resource is loaded in all conditions when template methods getCached... are called externally +- reverted the change 0f 30/04/2010. With the exception of forward references template functions can be again called by a standard tag. 10/05/2010 - bugfix on {foreach} and {for} optimizations of 27/04/2010 diff --git a/libs/sysplugins/smarty_internal_templatecompilerbase.php b/libs/sysplugins/smarty_internal_templatecompilerbase.php index 37cd1815..91ed8886 100644 --- a/libs/sysplugins/smarty_internal_templatecompilerbase.php +++ b/libs/sysplugins/smarty_internal_templatecompilerbase.php @@ -110,7 +110,14 @@ class Smarty_Internal_TemplateCompilerBase { $this->has_code = true; $this->has_output = false; // compile the smarty tag (required compile classes to compile the tag are autoloaded) - if (($_output = $this->callTagCompiler($tag, $args)) !== false) { + if (($_output = $this->callTagCompiler($tag, $args)) === false) { + if (isset($this->smarty->template_functions[$tag])) { + // template defined by {template} tag + $args['name'] = "'" . $tag . "'"; + $_output = $this->callTagCompiler('call', $args); + } + } + if ($_output !== false) { if ($_output !== true) { // did we get compiled code if ($this->has_code) {