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

@@ -34,7 +34,7 @@
//set the directory
$xml_dir = $settings->get('switch','conf').'/autoload_configs';
$xml_file = $xml_dir."/conference.conf";
$xml_file_alt = $_SERVER["DOCUMENT_ROOT"].'/'.PROJECT_PATH.'/app/switch/resources/conf/autoload_configs/conference.conf';
$xml_file_alt = dirname(__DIR__, 2).'/'.PROJECT_PATH.'/app/switch/resources/conf/autoload_configs/conference.conf';
//rename the file
if (file_exists($xml_dir.'/conference.conf.xml.noload')) {