From c84e406db544aea41c982fddde537502db5af08f Mon Sep 17 00:00:00 2001 From: Uwe Tews Date: Mon, 29 Jun 2015 20:48:49 +0200 Subject: [PATCH] observe $smarty->compile_check --- libs/sysplugins/smarty_template_cached.php | 2 +- libs/sysplugins/smarty_template_compiled.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/sysplugins/smarty_template_cached.php b/libs/sysplugins/smarty_template_cached.php index 5b904395..cafe1eeb 100644 --- a/libs/sysplugins/smarty_template_cached.php +++ b/libs/sysplugins/smarty_template_cached.php @@ -158,7 +158,7 @@ class Smarty_Template_Cached // lifetime expired $this->valid = false; } - if ($this->valid && $_template->source->timestamp > $this->timestamp) { + if ($this->valid && $_template->smarty->compile_check && $_template->source->timestamp > $this->timestamp) { $this->valid = false; } if ($this->valid || !$_template->smarty->cache_locking) { diff --git a/libs/sysplugins/smarty_template_compiled.php b/libs/sysplugins/smarty_template_compiled.php index adc41698..1c13c6b7 100644 --- a/libs/sysplugins/smarty_template_compiled.php +++ b/libs/sysplugins/smarty_template_compiled.php @@ -150,7 +150,7 @@ class Smarty_Template_Compiled public function process(Smarty_Internal_Template $_template) { $_smarty_tpl = $_template; - if ($_template->source->recompiled || !$_template->compiled->exists || $_template->smarty->force_compile) { + if ($_template->source->recompiled || !$_template->compiled->exists || $_template->smarty->force_compile || ($_template->smarty->compile_check && $_template->source->timestamp > $_template->compiled->timestamp)) { $this->compileTemplateSource($_template); $compileCheck = $_template->smarty->compile_check; $_template->smarty->compile_check = false;