From c000b3a480b7fa4ac9a893d81c0551288a6b5c87 Mon Sep 17 00:00:00 2001 From: "uwe.tews@googlemail.com" Date: Tue, 7 Feb 2012 21:55:37 +0000 Subject: [PATCH] - enhancement cacheable parameter added to default plugin handler, same functionality as in registerPlugin (request by calguy1000) --- change_log.txt | 1 + libs/sysplugins/smarty_internal_templatecompilerbase.php | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/change_log.txt b/change_log.txt index 606638a3..da976b92 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,6 +1,7 @@ ===== trunk ===== 07.02.2012 - bugfix increase entropy of internal function names in compiled and cached template files (Forum Topic 20996) +- enhancement cacheable parameter added to default plugin handler, same functionality as in registerPlugin (request by calguy1000) 06.02.2012 - improvement stream_resolve_include_path() added to Smarty_Internal_Get_Include_Path (Forum Topic 20980) diff --git a/libs/sysplugins/smarty_internal_templatecompilerbase.php b/libs/sysplugins/smarty_internal_templatecompilerbase.php index 13471b3b..a9264c73 100644 --- a/libs/sysplugins/smarty_internal_templatecompilerbase.php +++ b/libs/sysplugins/smarty_internal_templatecompilerbase.php @@ -509,11 +509,13 @@ abstract class Smarty_Internal_TemplateCompilerBase { { $callback = null; $script = null; + $cacheable = true; $result = call_user_func_array( $this->smarty->default_plugin_handler_func, - array($tag, $plugin_type, $this->template, &$callback, &$script) + array($tag, $plugin_type, $this->template, &$callback, &$script, &$cacheable) ); if ($result) { + $this->tag_nocache = $this->tag_nocache || !$cacheable; if ($script !== null) { if (is_file($script)) { if ($this->template->caching && ($this->nocache || $this->tag_nocache)) {