observe $smarty->compile_check

This commit is contained in:
Uwe Tews
2015-06-29 20:48:49 +02:00
parent 83f6154eae
commit c84e406db5
2 changed files with 2 additions and 2 deletions

View File

@@ -158,7 +158,7 @@ class Smarty_Template_Cached
// lifetime expired // lifetime expired
$this->valid = false; $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; $this->valid = false;
} }
if ($this->valid || !$_template->smarty->cache_locking) { if ($this->valid || !$_template->smarty->cache_locking) {

View File

@@ -150,7 +150,7 @@ class Smarty_Template_Compiled
public function process(Smarty_Internal_Template $_template) public function process(Smarty_Internal_Template $_template)
{ {
$_smarty_tpl = $_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); $this->compileTemplateSource($_template);
$compileCheck = $_template->smarty->compile_check; $compileCheck = $_template->smarty->compile_check;
$_template->smarty->compile_check = false; $_template->smarty->compile_check = false;