mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
observe $smarty->compile_check
This commit is contained in:
@@ -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) {
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user