Use the new config class in the domains and schema classes.

This commit is contained in:
markjcrane
2015-11-27 19:59:50 -07:00
parent 82e602e93a
commit 1691c3e5f0
3 changed files with 43 additions and 14 deletions

View File

@@ -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;
}
/**