mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
update constructor to check for SMARTY_DIR before assigning
This commit is contained in:
@@ -215,16 +215,18 @@ class Smarty
|
||||
\*======================================================================*/
|
||||
function Smarty()
|
||||
{
|
||||
$this->template_dir = SMARTY_DIR.$this->template_dir;
|
||||
$this->config_dir = SMARTY_DIR.$this->config_dir;
|
||||
$this->compile_dir = SMARTY_DIR.$this->compile_dir;
|
||||
$this->cache_dir = SMARTY_DIR.$this->cache_dir;
|
||||
|
||||
for ($x=0; $x < count($this->secure_dir); $x++) {
|
||||
$this->secure_dir[$x] = SMARTY_DIR.$this->secure_dir[$x];
|
||||
}
|
||||
for ($x=0; $x < count($this->trusted_dir); $x++) {
|
||||
$this->trusted_dir[$x] = SMARTY_DIR.$this->trusted_dir[$x];
|
||||
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;
|
||||
$this->cache_dir = SMARTY_DIR.$this->cache_dir;
|
||||
|
||||
for ($x=0; $x < count($this->secure_dir); $x++) {
|
||||
$this->secure_dir[$x] = SMARTY_DIR.$this->secure_dir[$x];
|
||||
}
|
||||
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) {
|
||||
|
@@ -215,16 +215,18 @@ class Smarty
|
||||
\*======================================================================*/
|
||||
function Smarty()
|
||||
{
|
||||
$this->template_dir = SMARTY_DIR.$this->template_dir;
|
||||
$this->config_dir = SMARTY_DIR.$this->config_dir;
|
||||
$this->compile_dir = SMARTY_DIR.$this->compile_dir;
|
||||
$this->cache_dir = SMARTY_DIR.$this->cache_dir;
|
||||
|
||||
for ($x=0; $x < count($this->secure_dir); $x++) {
|
||||
$this->secure_dir[$x] = SMARTY_DIR.$this->secure_dir[$x];
|
||||
}
|
||||
for ($x=0; $x < count($this->trusted_dir); $x++) {
|
||||
$this->trusted_dir[$x] = SMARTY_DIR.$this->trusted_dir[$x];
|
||||
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;
|
||||
$this->cache_dir = SMARTY_DIR.$this->cache_dir;
|
||||
|
||||
for ($x=0; $x < count($this->secure_dir); $x++) {
|
||||
$this->secure_dir[$x] = SMARTY_DIR.$this->secure_dir[$x];
|
||||
}
|
||||
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) {
|
||||
|
Reference in New Issue
Block a user