Get the DOCUMENT_ROOT and PROJECT_PATH

This commit is contained in:
FusionPBX
2022-10-11 17:10:39 -06:00
committed by GitHub
parent b373e3c7fe
commit 0a47fc22b3
+9 -1
View File
@@ -45,6 +45,13 @@ if (!class_exists('schema')) {
$this->db = $database->db; $this->db = $database->db;
} }
//set the include path
$conf = glob("{/usr/local/etc,/etc}/fusionpbx/config.conf", GLOB_BRACE);
set_include_path(parse_ini_file($conf[0])['document.root']);
//includes files
include "resources/require.php";
//get the list of installed apps from the core and mod directories //get the list of installed apps from the core and mod directories
$config_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/*/app_config.php"); $config_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/*/app_config.php");
$x=0; $x=0;
@@ -491,7 +498,7 @@ if (!class_exists('schema')) {
set_include_path(parse_ini_file($conf[0])['document.root']); set_include_path(parse_ini_file($conf[0])['document.root']);
//includes files //includes files
require_once "resources/require.php"; include "resources/require.php";
//add multi-lingual support //add multi-lingual support
if (!isset($text)) { if (!isset($text)) {
@@ -560,6 +567,7 @@ if (!class_exists('schema')) {
} }
} }
if (strlen($table_name) > 0) { if (strlen($table_name) > 0) {
//check if the table exists //check if the table exists
if ($this->db_table_exists($db_type, $db_name, $table_name)) { if ($this->db_table_exists($db_type, $db_name, $table_name)) {
$apps[$x]['db'][$y]['exists'] = 'true'; $apps[$x]['db'][$y]['exists'] = 'true';