mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 19:04:27 +02:00
Create config object in fetch() or just set the config path if it already
exists.
This commit is contained in:
@@ -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);
|
extract($this->_tpl_vars);
|
||||||
|
|
||||||
if ($this->show_info_header) {
|
if ($this->show_info_header) {
|
||||||
|
@@ -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);
|
extract($this->_tpl_vars);
|
||||||
|
|
||||||
if ($this->show_info_header) {
|
if ($this->show_info_header) {
|
||||||
|
Reference in New Issue
Block a user