Use settings class for app_defaults.php

This commit is contained in:
FusionPBX
2023-09-16 00:22:12 -06:00
committed by GitHub
parent 81b92075a9
commit c6d966395e
17 changed files with 44 additions and 228 deletions

View File

@@ -27,13 +27,13 @@
if ($domains_processed == 1) {
//set the directory
if (isset($_SESSION["switch"]["conf"])) {
$xml_dir = $_SESSION["switch"]["conf"].'/autoload_configs';
if (!empty($setting->get('switch','conf'))) {
$xml_dir = $setting->get('switch','conf').'/autoload_configs';
$xml_file = $xml_dir."/local_stream.conf";
}
//rename the file
if (isset($_SESSION["switch"]["conf"])) {
if (!empty($setting->get('switch','conf'))) {
if (file_exists($xml_dir.'/local_stream.conf.xml')) {
rename($xml_dir.'/local_stream.conf', $xml_dir.'/'.$xml_file);
}
@@ -43,7 +43,7 @@ if ($domains_processed == 1) {
}
//add the music_on_hold list to the database
if (isset($_SESSION["switch"]["conf"])) {
if (!empty($setting->get('switch','conf'))) {
$sql = "select count(music_on_hold_uuid) from v_music_on_hold; ";
$database = new database;
$num_rows = $database->select($sql, null, 'column');