diff --git a/NEWS b/NEWS index 7b2b5150..8595ddb0 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ + - set mtime on compile files so they match source + files (Monte, Peter Bowen) - added proper support for open_basedir setting (Monte, Alessandro Astarita) - added strip variable modifier, updated docs (Monte) diff --git a/Smarty.class.php b/Smarty.class.php index ce6d3fe0..0bfbc0e8 100644 --- a/Smarty.class.php +++ b/Smarty.class.php @@ -931,7 +931,7 @@ function _generate_debug_output() { } else { // compile template $this->_compile_template($tpl_file, $template_source, $template_compiled); - $this->_write_compiled_template($compile_path, $template_compiled); + $this->_write_compiled_template($compile_path, $template_compiled, $template_timestamp); return true; } } @@ -942,7 +942,7 @@ function _generate_debug_output() { return false; } $this->_compile_template($tpl_file, $template_source, $template_compiled); - $this->_write_compiled_template($compile_path, $template_compiled); + $this->_write_compiled_template($compile_path, $template_compiled, $template_timestamp); return true; } } @@ -961,10 +961,11 @@ function _generate_debug_output() { Function: _write_compiled_template Purpose: \*======================================================================*/ - function _write_compiled_template($compile_path, $template_compiled) + function _write_compiled_template($compile_path, $template_compiled, $template_timestamp) { // we save everything into $compile_dir $this->_write_file($compile_path, $template_compiled, true); + touch($compile_path, $template_timestamp); return true; } diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index ce6d3fe0..0bfbc0e8 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -931,7 +931,7 @@ function _generate_debug_output() { } else { // compile template $this->_compile_template($tpl_file, $template_source, $template_compiled); - $this->_write_compiled_template($compile_path, $template_compiled); + $this->_write_compiled_template($compile_path, $template_compiled, $template_timestamp); return true; } } @@ -942,7 +942,7 @@ function _generate_debug_output() { return false; } $this->_compile_template($tpl_file, $template_source, $template_compiled); - $this->_write_compiled_template($compile_path, $template_compiled); + $this->_write_compiled_template($compile_path, $template_compiled, $template_timestamp); return true; } } @@ -961,10 +961,11 @@ function _generate_debug_output() { Function: _write_compiled_template Purpose: \*======================================================================*/ - function _write_compiled_template($compile_path, $template_compiled) + function _write_compiled_template($compile_path, $template_compiled, $template_timestamp) { // we save everything into $compile_dir $this->_write_file($compile_path, $template_compiled, true); + touch($compile_path, $template_timestamp); return true; }