Replace the DOCUMENT_ROOT and PROJECT_ROOT variables

Use the __DIR__ constant and dirname as needed
This commit is contained in:
FusionPBX
2025-12-08 14:12:19 -07:00
committed by GitHub
parent df90513f86
commit 6b063f2c28
84 changed files with 217 additions and 210 deletions

View File

@@ -64,7 +64,7 @@ class permission {
function delete() {
//get the $apps array from the installed apps from the core and mod directories
$config_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/*/app_config.php");
$config_list = glob(dirname(__DIR__, 4) . "/*/*/app_config.php");
$x = 0;
foreach ($config_list as $config_path) {
include($config_path);
@@ -165,7 +165,7 @@ class permission {
$this->database_group_permissions = $this->database->select($sql, null, 'all');
//get the $apps array from the installed apps from the core and mod directories
$config_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/*/app_config.php");
$config_list = glob(dirname(__DIR__, 4) . "/*/*/app_config.php");
$x = 0;
foreach ($config_list as $config_path) {
include($config_path);