mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Replace the DOCUMENT_ROOT and PROJECT_ROOT variables
Use the __DIR__ constant and dirname as needed
This commit is contained in:
@@ -2007,7 +2007,7 @@
|
||||
}
|
||||
|
||||
//hold music
|
||||
if (permission_exists("destination_hold_music") && is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/music_on_hold')) {
|
||||
if (permission_exists("destination_hold_music") && is_dir(dirname(__DIR__, 2).'/app/music_on_hold')) {
|
||||
echo "<tr id='tr_hold_music'>\n";
|
||||
echo "<td width=\"30%\" class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-destination_hold_music']."\n";
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -405,7 +405,7 @@
|
||||
$destination = $row['field']['destination'] ?? '';
|
||||
|
||||
//add multi-lingual support
|
||||
if (file_exists($_SERVER["PROJECT_ROOT"]."/app/".$name."/app_languages.php")) {
|
||||
if (file_exists(dirname(__DIR__, 4)."/app/".$name."/app_languages.php")) {
|
||||
$text2 = $language2->get($this->language, 'app/'.$name);
|
||||
}
|
||||
|
||||
@@ -540,7 +540,7 @@
|
||||
$selected = (isset($destination_key) && $key == $destination_key) ? "selected='selected'" : '';
|
||||
|
||||
//add multi-lingual support
|
||||
if (file_exists($_SERVER["PROJECT_ROOT"]."/app/".$key."/app_languages.php")) {
|
||||
if (file_exists(dirname(__DIR__, 4)."/app/".$key."/app_languages.php")) {
|
||||
$text2 = $language2->get($this->language, 'app/'.$key);
|
||||
$found = 'true';
|
||||
}
|
||||
@@ -617,7 +617,7 @@
|
||||
$destination = $row['field']['destination'] ?? '';
|
||||
|
||||
//add multi-lingual support
|
||||
if (file_exists($_SERVER["PROJECT_ROOT"]."/app/".$name."/app_languages.php")) {
|
||||
if (file_exists(dirname(__DIR__, 4)."/app/".$name."/app_languages.php")) {
|
||||
$language2 = new text;
|
||||
$text2 = $language2->get($this->language, 'app/'.$name);
|
||||
}
|
||||
@@ -729,7 +729,7 @@
|
||||
$destination = $row['field']['destination'] ?? null;
|
||||
|
||||
//add multi-lingual support
|
||||
if (file_exists($_SERVER["PROJECT_ROOT"]."/app/".$name."/app_languages.php")) {
|
||||
if (file_exists(dirname(__DIR__, 4)."/app/".$name."/app_languages.php")) {
|
||||
$language2 = new text;
|
||||
$text2 = $language2->get($this->language, 'app/'.$name);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user