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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 1 deletions

View File

@ -45,6 +45,13 @@ if (!class_exists('schema')) {
$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
$config_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/*/app_config.php");
$x=0;
@ -491,7 +498,7 @@ if (!class_exists('schema')) {
set_include_path(parse_ini_file($conf[0])['document.root']);
//includes files
require_once "resources/require.php";
include "resources/require.php";
//add multi-lingual support
if (!isset($text)) {
@ -560,6 +567,7 @@ if (!class_exists('schema')) {
}
}
if (strlen($table_name) > 0) {
//check if the table exists
if ($this->db_table_exists($db_type, $db_name, $table_name)) {
$apps[$x]['db'][$y]['exists'] = 'true';