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

@@ -149,12 +149,12 @@
unset($parameters);
//change the working directory
chdir($_SERVER['DOCUMENT_ROOT']);
chdir(dirname(__DIR__, 4));
//process the messages
if (is_array($fax_queue) && @sizeof($fax_queue) != 0) {
foreach($fax_queue as $row) {
$command = PHP_BINARY." ".$_SERVER['DOCUMENT_ROOT']."/app/fax_queue/resources/job/fax_send.php ";
$command = PHP_BINARY." ".dirname(__DIR__, 4)."/app/fax_queue/resources/job/fax_send.php ";
$command .= "'action=send&fax_queue_uuid=".$row["fax_queue_uuid"]."&hostname=".$hostname."&debug=true'";
if (isset($debug)) {
//run process inline to see debug info

View File

@@ -141,7 +141,7 @@
}
//change the working directory
chdir($_SERVER['DOCUMENT_ROOT']);
chdir(dirname(__DIR__, 4));
//get the messages waiting in the fax queue
while (true) {
@@ -195,7 +195,7 @@
//process the messages
if (is_array($fax_queue) && @sizeof($fax_queue) != 0) {
foreach($fax_queue as $row) {
$command = PHP_BINARY." ".$_SERVER['DOCUMENT_ROOT']."/app/fax_queue/resources/job/fax_send.php ";
$command = PHP_BINARY." ".dirname(__DIR__, 4)."/app/fax_queue/resources/job/fax_send.php ";
$command .= "'action=send&fax_queue_uuid=".$row["fax_queue_uuid"]."&hostname=".$hostname."'";
if (isset($debug)) {
//run process inline to see debug info