diff --git a/Smarty.class.php b/Smarty.class.php index 5c1267c0..7d2d5908 100644 --- a/Smarty.class.php +++ b/Smarty.class.php @@ -175,11 +175,6 @@ class Smarty } } } - - /* Prepare the configuration object. */ - if (!class_exists('Config_File')) - include_once dirname(__FILE__) . '/Config_File.class.php'; - $this->_conf_obj = new Config_File($this->config_dir); } @@ -498,6 +493,14 @@ class Smarty } } + if ($this->_conf_obj === null) { + /* Prepare the configuration object. */ + if (!class_exists('Config_File')) + include_once dirname(__FILE__) . '/Config_File.class.php'; + $this->_conf_obj = new Config_File($this->config_dir); + } else + $this->_conf_obj->set_path($this->config_dir); + extract($this->_tpl_vars); if ($this->show_info_header) { diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 5c1267c0..7d2d5908 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -175,11 +175,6 @@ class Smarty } } } - - /* Prepare the configuration object. */ - if (!class_exists('Config_File')) - include_once dirname(__FILE__) . '/Config_File.class.php'; - $this->_conf_obj = new Config_File($this->config_dir); } @@ -498,6 +493,14 @@ class Smarty } } + if ($this->_conf_obj === null) { + /* Prepare the configuration object. */ + if (!class_exists('Config_File')) + include_once dirname(__FILE__) . '/Config_File.class.php'; + $this->_conf_obj = new Config_File($this->config_dir); + } else + $this->_conf_obj->set_path($this->config_dir); + extract($this->_tpl_vars); if ($this->show_info_header) {