From 8f90018f0425f90a505753db495d7171a99cd5c2 Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Wed, 30 Oct 2013 10:15:07 +0100 Subject: [PATCH] set smarty force compile to false in non debug mode --- core/lib/Thelia/Core/Template/Smarty/SmartyParser.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/core/lib/Thelia/Core/Template/Smarty/SmartyParser.php b/core/lib/Thelia/Core/Template/Smarty/SmartyParser.php index 68da0af12..92c1377ce 100755 --- a/core/lib/Thelia/Core/Template/Smarty/SmartyParser.php +++ b/core/lib/Thelia/Core/Template/Smarty/SmartyParser.php @@ -70,8 +70,14 @@ class SmartyParser extends Smarty implements ParserInterface $this->error_reporting = E_ALL ^ E_NOTICE; // Si on n'est pas en mode debug, activer le cache, avec une lifetime de 15mn, et en vérifiant que les templates sources n'ont pas été modifiés. - $this->caching = Smarty::CACHING_OFF; - $this->force_compile = true; + + if($debug) { + $this->setCaching(Smarty::CACHING_OFF); + $this->setForceCompile(true); + } else { + $this->setForceCompile(false); + } + // The default HTTP status $this->status = 200;