mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Use the new config class in the domains and schema classes.
This commit is contained in:
@@ -67,17 +67,21 @@ class config {
|
||||
* @var string $config_path - full path to the config.php file
|
||||
*/
|
||||
public function find() {
|
||||
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/resources/config.php")) {
|
||||
$this->config_path = $_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/resources/config.php";
|
||||
} elseif (file_exists("/etc/fusionpbx/config.php")) {
|
||||
$this->config_path = "/etc/fusionpbx/config.php";
|
||||
} elseif (file_exists("/usr/local/etc/fusionpbx/config.php")) {
|
||||
$this->config_path = "/usr/local/etc/fusionpbx/config.php";
|
||||
}
|
||||
else {
|
||||
$this->config_path = '';
|
||||
}
|
||||
return $this->config_path;
|
||||
//get the PROJECT PATH
|
||||
include "root.php";
|
||||
// find the file
|
||||
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/resources/config.php")) {
|
||||
$this->config_path = $_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/resources/config.php";
|
||||
} elseif (file_exists("/etc/fusionpbx/config.php")) {
|
||||
$this->config_path = "/etc/fusionpbx/config.php";
|
||||
} elseif (file_exists("/usr/local/etc/fusionpbx/config.php")) {
|
||||
$this->config_path = "/usr/local/etc/fusionpbx/config.php";
|
||||
}
|
||||
else {
|
||||
$this->config_path = '';
|
||||
}
|
||||
//return the path
|
||||
return $this->config_path;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user