fix typo, fix write_cache_paths logic

This commit is contained in:
mohrt
2003-06-25 22:29:03 +00:00
parent 5ae5a6f576
commit 674722e332
2 changed files with 4 additions and 1 deletions

View File

@@ -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;

View File

@@ -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 = '<?php $this->_cache_paths = ' . $_compiled_content . '; ?>';
$_params = array('compile_path' => $smarty->_cache_paths_file, 'compiled_content' => $_compiled_content, 'resource_timestamp' => time());