From ad79be90a0215d76fbcbc052d1878985de877e5a Mon Sep 17 00:00:00 2001 From: messju Date: Thu, 1 Jul 2004 15:48:40 +0000 Subject: [PATCH] removed use of get_include_filepath() inside get_auto_filename(). thanks go to c960657 --- NEWS | 2 ++ libs/Smarty.class.php | 11 +---------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/NEWS b/NEWS index 221c0bc8..8cd29626 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ + - fix unnecessary call to smarty_core_get_include_path() inside + Smarty::_get_auto_filename() (c960657, messju) - add error-messages when anything else than an identifier is passed to foreach's key- or item-attribute (messju) - fix handling of digits inside tagnames (messju) diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index d5fae56d..746e27c5 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -1727,16 +1727,7 @@ class Smarty function _get_auto_filename($auto_base, $auto_source = null, $auto_id = null) { $_compile_dir_sep = $this->use_sub_dirs ? DIRECTORY_SEPARATOR : '^'; - - if(@is_dir($auto_base)) { - $_return = $auto_base . DIRECTORY_SEPARATOR; - } else { - // auto_base not found, try include_path - $_params = array('file_path' => $auto_base); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.get_include_path.php'); - smarty_core_get_include_path($_params, $this); - $_return = isset($_params['new_file_path']) ? $_params['new_file_path'] . DIRECTORY_SEPARATOR : null; - } + $_return = $auto_base . DIRECTORY_SEPARATOR; if(isset($auto_id)) { // make auto_id safe for directory names