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

@@ -100,7 +100,7 @@
if ($destination_action == $value) {
if ($group == 'other') {
if (!isset($language2) && !isset($text2)) {
if (file_exists($_SERVER["PROJECT_ROOT"]."/app/dialplans/app_languages.php")) {
if (file_exists(dirname(__DIR__, 2)."/app/dialplans/app_languages.php")) {
$language2 = new text;
$text2 = $language2->get($settings->get('domain', 'language', 'en-us'), 'app/dialplans');
}
@@ -108,7 +108,7 @@
$actions[] = trim($text2['title-other'].' › '.$text2['option-'.str_replace('_','_',$key)]);
}
else {
if (file_exists($_SERVER["PROJECT_ROOT"]."/app/".$group."/app_languages.php")) {
if (file_exists(dirname(__DIR__, 2)."/app/".$group."/app_languages.php")) {
$language3 = new text;
$text3 = $language3->get($settings->get('domain', 'language', 'en-us'), 'app/'.$group);
$actions[] = trim($text3['title-'.$group].' › '.$key);