From 06b4bddd47678253a12d6492a039b15bd1f69d25 Mon Sep 17 00:00:00 2001 From: mohrt Date: Wed, 4 Jun 2003 13:50:50 +0000 Subject: [PATCH] *** empty log message *** --- NEWS | 2 ++ libs/Smarty.class.php | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/NEWS b/NEWS index 91844d95..03d726a3 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ + - add discrete error checking pertaining to $cache_dir + and $compile_dir, their existance and writability (Monte) - fixed behaviour of start=... for {counter} (messju) - fixed assign for {counter} (messju) - added params vdir, hdir and inner to html_table to allow looping diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index bbe597e0..11df9a52 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -1389,15 +1389,15 @@ class Smarty if (!$this->_execute_core_function('fetch_template_info', $_params)) { return false; } - $template_source = $_params['template_source']; - $template_timestamp = $_params['template_timestamp']; - if ($template_timestamp <= filemtime($compile_path)) { + $_template_source = $_params['template_source']; + $_template_timestamp = $_params['template_timestamp']; + if ($_template_timestamp <= filemtime($compile_path)) { // template not expired, no recompile return true; } else { // compile template - $this->_compile_template($tpl_file, $template_source, $template_compiled); - $_params = array('compile_path' => $compile_path, 'template_compiled' => $template_compiled, 'template_timestamp' => $template_timestamp); + $this->_compile_template($tpl_file, $_template_source, $_template_compiled); + $_params = array('compile_path' => $compile_path, 'template_compiled' => $_template_compiled, 'template_timestamp' => $_template_timestamp); $this->_execute_core_function('write_compiled_template', $_params); return true; } @@ -1408,10 +1408,10 @@ class Smarty if (!$this->_execute_core_function('fetch_template_info', $_params)) { return false; } - $template_source = $_params['template_source']; - $template_timestamp = $_params['template_timestamp']; - $this->_compile_template($tpl_file, $template_source, $template_compiled); - $_params = array('compile_path' => $compile_path, 'template_compiled' => $template_compiled, 'template_timestamp' => $template_timestamp); + $_template_source = $_params['template_source']; + $_template_timestamp = $_params['template_timestamp']; + $this->_compile_template($tpl_file, $_template_source, $_template_compiled); + $_params = array('compile_path' => $compile_path, 'template_compiled' => $_template_compiled, 'template_timestamp' => $_template_timestamp); $this->_execute_core_function('write_compiled_template', $_params); return true; } @@ -1594,7 +1594,7 @@ class Smarty // auto_base not found, try include_path $_params = array('file_path' => $auto_base); $this->_execute_core_function('get_include_path', $_params); - $_res = $_params['new_file_path'] . DIRECTORY_SEPARATOR; + $_res = isset($_params['new_file_path']) ? $_params['new_file_path'] . DIRECTORY_SEPARATOR : null; } if(isset($auto_id)) {