From 674722e332e85880fffb0f0e46e6b7850d9ef007 Mon Sep 17 00:00:00 2001 From: mohrt Date: Wed, 25 Jun 2003 22:29:03 +0000 Subject: [PATCH] fix typo, fix write_cache_paths logic --- libs/core/core.assemble_auto_filename.php | 2 +- libs/core/core.write_cache_paths_file.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libs/core/core.assemble_auto_filename.php b/libs/core/core.assemble_auto_filename.php index 4255c645..c43dee96 100644 --- a/libs/core/core.assemble_auto_filename.php +++ b/libs/core/core.assemble_auto_filename.php @@ -18,7 +18,7 @@ function smarty_core_assemble_auto_filename($params, &$smarty) { - $_compile_dir_sep = $this->use_sub_dirs ? DIRECTORY_SEPARATOR : '^'; + $_compile_dir_sep = $smarty->use_sub_dirs ? DIRECTORY_SEPARATOR : '^'; if(@is_dir($params['auto_base'])) { $_return = $params['auto_base'] . DIRECTORY_SEPARATOR; diff --git a/libs/core/core.write_cache_paths_file.php b/libs/core/core.write_cache_paths_file.php index 85e90de9..eac52274 100644 --- a/libs/core/core.write_cache_paths_file.php +++ b/libs/core/core.write_cache_paths_file.php @@ -14,6 +14,9 @@ function smarty_core_write_cache_paths_file($params, &$smarty) { + if (!isset($smarty->_cache_paths_file)) { + return false; + } $_compiled_content = function_exists('var_export') ? var_export($smarty->_cache_paths, true) : "unserialize('" . serialize($smarty->_cache_paths) . "')"; $_compiled_content = '_cache_paths = ' . $_compiled_content . '; ?>'; $_params = array('compile_path' => $smarty->_cache_paths_file, 'compiled_content' => $_compiled_content, 'resource_timestamp' => time());