mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Replace the DOCUMENT_ROOT and PROJECT_ROOT variables
Use the __DIR__ constant and dirname as needed
This commit is contained in:
@@ -500,7 +500,7 @@ class device {
|
||||
} elseif (file_exists('/etc/fusionpbx/resources/templates/provision')) {
|
||||
$this->template_dir = '/etc/fusionpbx/resources/templates/provision';
|
||||
} else {
|
||||
$this->template_dir = $_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . '/resources/templates/provision';
|
||||
$this->template_dir = dirname(__DIR__, 4) . '/resources/templates/provision';
|
||||
}
|
||||
}
|
||||
} elseif (PHP_OS == "FreeBSD") {
|
||||
@@ -511,23 +511,23 @@ class device {
|
||||
} elseif (file_exists('/usr/local/etc/fusionpbx/resources/templates/provision')) {
|
||||
$this->template_dir = '/usr/local/etc/fusionpbx/resources/templates/provision';
|
||||
} else {
|
||||
$this->template_dir = $_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . '/resources/templates/provision';
|
||||
$this->template_dir = dirname(__DIR__, 4) . '/resources/templates/provision';
|
||||
}
|
||||
}
|
||||
} elseif (PHP_OS == "NetBSD") {
|
||||
//set the default template_dir
|
||||
if (empty($this->template_dir)) {
|
||||
$this->template_dir = $_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . '/resources/templates/provision';
|
||||
$this->template_dir = dirname(__DIR__, 4) . '/resources/templates/provision';
|
||||
}
|
||||
} elseif (PHP_OS == "OpenBSD") {
|
||||
//set the default template_dir
|
||||
if (empty($this->template_dir)) {
|
||||
$this->template_dir = $_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . '/resources/templates/provision';
|
||||
$this->template_dir = dirname(__DIR__, 4) . '/resources/templates/provision';
|
||||
}
|
||||
} else {
|
||||
//set the default template_dir
|
||||
if (empty($this->template_dir)) {
|
||||
$this->template_dir = $_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . '/resources/templates/provision';
|
||||
$this->template_dir = dirname(__DIR__, 4) . '/resources/templates/provision';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user