Change $_SERVER['DOCUMENT_ROOT'].PROJECT_PATH to $_SERVER["PROJECT_ROOT"].
This commit is contained in:
@@ -70,8 +70,8 @@ class config {
|
||||
//get the PROJECT PATH
|
||||
include "root.php";
|
||||
// find the file
|
||||
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/resources/config.php")) {
|
||||
$this->config_path = $_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/resources/config.php";
|
||||
if (file_exists($_SERVER["PROJECT_ROOT"]."/resources/config.php")) {
|
||||
$this->config_path = $_SERVER["PROJECT_ROOT"]."/resources/config.php";
|
||||
} elseif (file_exists("/etc/fusionpbx/config.php")) {
|
||||
$this->config_path = "/etc/fusionpbx/config.php";
|
||||
} elseif (file_exists("/usr/local/etc/fusionpbx/config.php")) {
|
||||
|
||||
@@ -54,10 +54,10 @@ include "root.php";
|
||||
if (strlen($this->type) == 0 && strlen($this->db_name) == 0) {
|
||||
//include config.php
|
||||
include "root.php";
|
||||
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/resources/config.php")) {
|
||||
include $_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/resources/config.php";
|
||||
} elseif (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/resources/config.php")) {
|
||||
include $_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/resources/config.php";
|
||||
if (file_exists($_SERVER["PROJECT_ROOT"]."/resources/config.php")) {
|
||||
include $_SERVER["PROJECT_ROOT"]."/resources/config.php";
|
||||
} elseif (file_exists($_SERVER["PROJECT_ROOT"]."/resources/config.php")) {
|
||||
include $_SERVER["PROJECT_ROOT"]."/resources/config.php";
|
||||
} elseif (file_exists("/etc/fusionpbx/config.php")){
|
||||
//linux
|
||||
include "/etc/fusionpbx/config.php";
|
||||
|
||||
@@ -186,7 +186,7 @@ class destinations {
|
||||
$destination = $row['field']['destination'];
|
||||
|
||||
//add multi-lingual support
|
||||
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/".$name."/app_languages.php")) {
|
||||
if (file_exists($_SERVER["PROJECT_ROOT"]."/app/".$name."/app_languages.php")) {
|
||||
$language2 = new text;
|
||||
$text2 = $language2->get($_SESSION['domain']['language']['code'], 'app/'.$name);
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ require_once "resources/require.php";
|
||||
unset($menu_prep_statement, $menu_result, $menu_row);
|
||||
|
||||
//get the content
|
||||
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/content/app_config.php")) {
|
||||
if (file_exists($_SERVER["PROJECT_ROOT"]."/app/content/app_config.php")) {
|
||||
$sql = "select * from v_rss ";
|
||||
$sql .= "where domain_uuid =:domain_uuid ";
|
||||
$sql .= "and rss_category = 'content' ";
|
||||
|
||||
+10
-10
@@ -29,7 +29,7 @@ require_once "root.php";
|
||||
require_once "resources/require.php";
|
||||
|
||||
//get the event socket information
|
||||
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/settings/app_config.php")) {
|
||||
if (file_exists($_SERVER["PROJECT_ROOT"]."/app/settings/app_config.php")) {
|
||||
if (strlen($_SESSION['event_socket_ip_address']) == 0) {
|
||||
$sql = "select * from v_settings ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
@@ -49,7 +49,7 @@ require_once "resources/require.php";
|
||||
//get the extensions that are assigned to this user
|
||||
function load_extensions() {
|
||||
global $db;
|
||||
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/extensions/app_config.php")) {
|
||||
if (file_exists($_SERVER["PROJECT_ROOT"]."/app/extensions/app_config.php")) {
|
||||
if (strlen($_SESSION["domain_uuid"]) > 0 && strlen($_SESSION["user_uuid"]) > 0 && count($_SESSION['user']['extension']) == 0) {
|
||||
//get the user extension list
|
||||
unset($_SESSION['user']['extension']);
|
||||
@@ -128,7 +128,7 @@ function event_socket_request($fp, $cmd) {
|
||||
function event_socket_request_cmd($cmd) {
|
||||
global $db;
|
||||
|
||||
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/settings/app_config.php")) {
|
||||
if (file_exists($_SERVER["PROJECT_ROOT"]."/app/settings/app_config.php")) {
|
||||
$sql = "select * from v_settings ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
@@ -1442,25 +1442,25 @@ if (!function_exists('save_switch_xml')) {
|
||||
}
|
||||
}
|
||||
if (is_readable($_SESSION['switch']['conf']['dir'])) {
|
||||
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/settings/app_config.php")) {
|
||||
if (file_exists($_SERVER["PROJECT_ROOT"]."/app/settings/app_config.php")) {
|
||||
save_setting_xml();
|
||||
}
|
||||
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/modules/app_config.php")) {
|
||||
if (file_exists($_SERVER["PROJECT_ROOT"]."/app/modules/app_config.php")) {
|
||||
save_module_xml();
|
||||
}
|
||||
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/vars/app_config.php")) {
|
||||
if (file_exists($_SERVER["PROJECT_ROOT"]."/app/vars/app_config.php")) {
|
||||
save_var_xml();
|
||||
}
|
||||
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/call_center/app_config.php")) {
|
||||
if (file_exists($_SERVER["PROJECT_ROOT"]."/app/call_center/app_config.php")) {
|
||||
save_call_center_xml();
|
||||
}
|
||||
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/gateways/app_config.php")) {
|
||||
if (file_exists($_SERVER["PROJECT_ROOT"]."/app/gateways/app_config.php")) {
|
||||
save_gateway_xml();
|
||||
}
|
||||
//if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/ivr_menu/app_config.php")) {
|
||||
//if (file_exists($_SERVER["PROJECT_ROOT"]."/app/ivr_menu/app_config.php")) {
|
||||
// save_ivr_menu_xml();
|
||||
//}
|
||||
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/sip_profiles/app_config.php")) {
|
||||
if (file_exists($_SERVER["PROJECT_ROOT"]."/app/sip_profiles/app_config.php")) {
|
||||
save_sip_profile_xml();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user