diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 62e48472..a7a68dc9 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -587,20 +587,6 @@ class Smarty */ var $_cache_including = false; - /** - * cached file paths - * - * @var array - */ - var $_cache_paths = null; - - /** - * cached file pathname (set in constructor) - * - * @var array - */ - var $_cache_paths_file = null; - /**#@-*/ /** * The class constructor. @@ -1182,21 +1168,6 @@ class Smarty { static $_cache_info = array(); - $_compile_dir_sep = $this->use_sub_dirs ? DIRECTORY_SEPARATOR : '^'; - - $this->_cache_paths_file = - $this->compile_dir - . DIRECTORY_SEPARATOR - . '_smarty_cached_paths' - . $_compile_dir_sep - . urlencode($resource_name) - . '.php'; - - if(!$this->force_compile - && file_exists($this->_cache_paths_file)) { - include($this->_cache_paths_file); - } - $_smarty_old_error_level = $this->debugging ? error_reporting() : error_reporting(error_reporting() & ~E_NOTICE); if($this->security && !in_array($this->template_dir, $this->secure_dir)) { @@ -1439,26 +1410,12 @@ class Smarty * @param string $type * @param string $name * @return string|false - */ + */ function _get_plugin_filepath($type, $name) { - $_cache_paths_key = $type . '/' . $name; - if (isset($this->_cache_paths['plugins'][$_cache_paths_key])) { - return $this->_cache_paths['plugins'][$_cache_paths_key]; - } - $_params = array('type' => $type, 'name' => $name); require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.assemble_plugin_filepath.php'); - $_return = smarty_core_assemble_plugin_filepath($_params, $this); - - if ($_return !== false) { - $this->_cache_paths['plugins'][$_cache_paths_key] = $_return; - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.write_cache_paths_file.php'); - smarty_core_write_cache_paths_file(null, $this); - return $_return; - } - - return false; + return smarty_core_assemble_plugin_filepath($_params, $this); } /** @@ -1572,12 +1529,8 @@ class Smarty $smarty_compiler->default_modifiers = $this->default_modifiers; $smarty_compiler->compile_id = $this->_compile_id; $smarty_compiler->_config = $this->_config; - $smarty_compiler->request_use_auto_globals = $this->request_use_auto_globals; - $smarty_compiler->_cache_paths = $this->_cache_paths; - $smarty_compiler->_cache_paths_file = $this->_cache_paths_file; - $smarty_compiler->_cache_serial = null; $smarty_compiler->_cache_include = $cache_include_path; diff --git a/libs/Smarty_Compiler.class.php b/libs/Smarty_Compiler.class.php index bc9825c0..a0f9e9e3 100644 --- a/libs/Smarty_Compiler.class.php +++ b/libs/Smarty_Compiler.class.php @@ -86,8 +86,6 @@ class Smarty_Compiler extends Smarty { var $_nocache_count = 0; var $_cache_serial = null; var $_cache_include = null; - var $_cache_paths_file = null; - var $_cache_paths = null; var $_strip_depth = 0; var $_additional_newline = "\n"; diff --git a/libs/core/core.write_cache_paths_file.php b/libs/core/core.write_cache_paths_file.php deleted file mode 100644 index eac52274..00000000 --- a/libs/core/core.write_cache_paths_file.php +++ /dev/null @@ -1,29 +0,0 @@ -_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()); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.write_compiled_resource.php'); - return smarty_core_write_compiled_resource($_params, $smarty); -} - -/* vim: set expandtab: */ - -?>