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

@@ -833,7 +833,7 @@
if (is_array($result)) {
//determine if theme images exist
$theme_image_path = $_SERVER["DOCUMENT_ROOT"]."/themes/".$settings->get('domain', 'template', 'default')."/images/";
$theme_image_path = dirname(__DIR__, 2)."/themes/".$settings->get('domain', 'template', 'default')."/images/";
$theme_cdr_images_exist = (
file_exists($theme_image_path."icon_cdr_inbound_answered.png") &&
file_exists($theme_image_path."icon_cdr_inbound_no_answer.png") &&