Create config object in fetch() or just set the config path if it already

exists.
This commit is contained in:
andrey
2001-06-05 16:22:11 +00:00
parent cafc422417
commit a21e5f513a
2 changed files with 16 additions and 10 deletions

View File

@@ -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) {

View File

@@ -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) {