update constructor to check for SMARTY_DIR before assigning

This commit is contained in:
mohrt
2001-12-03 20:57:05 +00:00
parent 03107ad100
commit e26ffeb789
2 changed files with 24 additions and 20 deletions

View File

@@ -215,6 +215,7 @@ class Smarty
\*======================================================================*/
function Smarty()
{
if(!empty(SMARTY_DIR)) {
$this->template_dir = SMARTY_DIR.$this->template_dir;
$this->config_dir = SMARTY_DIR.$this->config_dir;
$this->compile_dir = SMARTY_DIR.$this->compile_dir;
@@ -226,6 +227,7 @@ class Smarty
for ($x=0; $x < count($this->trusted_dir); $x++) {
$this->trusted_dir[$x] = SMARTY_DIR.$this->trusted_dir[$x];
}
}
foreach ($this->global_assign as $key => $var_name) {
if (is_array($var_name)) {

View File

@@ -215,6 +215,7 @@ class Smarty
\*======================================================================*/
function Smarty()
{
if(!empty(SMARTY_DIR)) {
$this->template_dir = SMARTY_DIR.$this->template_dir;
$this->config_dir = SMARTY_DIR.$this->config_dir;
$this->compile_dir = SMARTY_DIR.$this->compile_dir;
@@ -226,6 +227,7 @@ class Smarty
for ($x=0; $x < count($this->trusted_dir); $x++) {
$this->trusted_dir[$x] = SMARTY_DIR.$this->trusted_dir[$x];
}
}
foreach ($this->global_assign as $key => $var_name) {
if (is_array($var_name)) {