enable config_load error messages

This commit is contained in:
mohrt
2003-02-14 20:27:46 +00:00
parent d23fe50562
commit dd0c98bb3e
3 changed files with 6 additions and 4 deletions

2
NEWS
View File

@@ -1,3 +1,5 @@
- enable error messages for config_load errors,
use $this->config_class for loading class name (Monte)
- fix html_options to not escape already escaped entities (Monte) - fix html_options to not escape already escaped entities (Monte)
- send Last-Modified header on cache creation (Monte) - send Last-Modified header on cache creation (Monte)
- check strict syntax of function attributes (Monte) - check strict syntax of function attributes (Monte)

View File

@@ -1269,14 +1269,14 @@ class Smarty
if($_compile_config) { if($_compile_config) {
if(!is_object($this->_conf_obj)) { if(!is_object($this->_conf_obj)) {
require_once SMARTY_DIR . $this->config_class . '.class.php'; require_once SMARTY_DIR . $this->config_class . '.class.php';
$this->_conf_obj = new Config_File($_config_dir); $this->_conf_obj = new $this->config_class($_config_dir);
$this->_conf_obj->overwrite = $this->config_overwrite; $this->_conf_obj->overwrite = $this->config_overwrite;
$this->_conf_obj->booleanize = $this->config_booleanize; $this->_conf_obj->booleanize = $this->config_booleanize;
$this->_conf_obj->read_hidden = $this->config_read_hidden; $this->_conf_obj->read_hidden = $this->config_read_hidden;
$this->_conf_obj->fix_newlines = $this->config_fix_newlines; $this->_conf_obj->fix_newlines = $this->config_fix_newlines;
$this->_conf_obj->set_path = $_config_dir; $this->_conf_obj->set_path = $_config_dir;
} }
if($_config_vars = @array_merge($this->_conf_obj->get($file), if($_config_vars = array_merge($this->_conf_obj->get($file),
$this->_conf_obj->get($file, $section))) { $this->_conf_obj->get($file, $section))) {
if(function_exists('var_export')) { if(function_exists('var_export')) {
$_compile_data = '<?php $_config_vars = ' . var_export($_config_vars, true) . '; return true; ?>'; $_compile_data = '<?php $_config_vars = ' . var_export($_config_vars, true) . '; return true; ?>';

View File

@@ -1269,14 +1269,14 @@ class Smarty
if($_compile_config) { if($_compile_config) {
if(!is_object($this->_conf_obj)) { if(!is_object($this->_conf_obj)) {
require_once SMARTY_DIR . $this->config_class . '.class.php'; require_once SMARTY_DIR . $this->config_class . '.class.php';
$this->_conf_obj = new Config_File($_config_dir); $this->_conf_obj = new $this->config_class($_config_dir);
$this->_conf_obj->overwrite = $this->config_overwrite; $this->_conf_obj->overwrite = $this->config_overwrite;
$this->_conf_obj->booleanize = $this->config_booleanize; $this->_conf_obj->booleanize = $this->config_booleanize;
$this->_conf_obj->read_hidden = $this->config_read_hidden; $this->_conf_obj->read_hidden = $this->config_read_hidden;
$this->_conf_obj->fix_newlines = $this->config_fix_newlines; $this->_conf_obj->fix_newlines = $this->config_fix_newlines;
$this->_conf_obj->set_path = $_config_dir; $this->_conf_obj->set_path = $_config_dir;
} }
if($_config_vars = @array_merge($this->_conf_obj->get($file), if($_config_vars = array_merge($this->_conf_obj->get($file),
$this->_conf_obj->get($file, $section))) { $this->_conf_obj->get($file, $section))) {
if(function_exists('var_export')) { if(function_exists('var_export')) {
$_compile_data = '<?php $_config_vars = ' . var_export($_config_vars, true) . '; return true; ?>'; $_compile_data = '<?php $_config_vars = ' . var_export($_config_vars, true) . '; return true; ?>';