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

@@ -37,11 +37,11 @@
$number_translation->xml = file_get_contents($xml_file);
$number_translation->import();
}
//check for existing configuration
if (!empty($_SESSION['switch']['conf']['dir']) && file_exists($_SESSION['switch']['conf']['dir']."/autoload_configs/translate.conf.xml")) {
if (!empty($setting->get('switch','conf')) && file_exists($setting->get('switch','conf')."/autoload_configs/translate.conf.xml")) {
//import existing data
$xml = file_get_contents($_SESSION['switch']['conf']['dir']."/autoload_configs/translate.conf.xml");
$xml = file_get_contents($setting->get('switch','conf')."/autoload_configs/translate.conf.xml");
//convert the xml string to an xml object
$xml = simplexml_load_string($xml);