From 5a9500c2d95d63855fa117080fe7b82fe5b229f0 Mon Sep 17 00:00:00 2001 From: uwetews Date: Tue, 15 Sep 2015 01:25:40 +0200 Subject: [PATCH] - remove not needed compiled code whan caching is disabled --- libs/sysplugins/smarty_internal_smartytemplatecompiler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/sysplugins/smarty_internal_smartytemplatecompiler.php b/libs/sysplugins/smarty_internal_smartytemplatecompiler.php index c5f6c68c..b00e5235 100644 --- a/libs/sysplugins/smarty_internal_smartytemplatecompiler.php +++ b/libs/sysplugins/smarty_internal_smartytemplatecompiler.php @@ -70,7 +70,7 @@ class Smarty_Internal_SmartyTemplateCompiler extends Smarty_Internal_TemplateCom // init the lexer/parser to compile the template $this->parser = new $this->parser_class(new $this->lexer_class(str_replace(array("\r\n", "\r"), "\n", $_content), $this), $this); - if ($isTemplateSource) { + if ($isTemplateSource && $this->template->caching) { $this->parser->insertPhpCode("compiled->nocache_hash = '{$this->nocache_hash}';\n?>\n"); } if (function_exists('mb_internal_encoding') && ((int) ini_get('mbstring.func_overload')) & 2) {