Removed code from app_config.php

This commit is contained in:
FusionPBX
2023-06-05 12:50:21 -06:00
committed by GitHub
parent 658281f46d
commit 6314053331

View File

@@ -29,39 +29,6 @@
$apps[$x]['description']['sv-se'] = "";
$apps[$x]['description']['uk-ua'] = "";
//destination details
$languages = glob($_SESSION["switch"]['sounds']['dir']."/*/*/*");
foreach ($languages as $key => $path) {
$path = str_replace($_SESSION["switch"]['sounds']['dir'].'/', "", $path);
$path_array = explode('/', $path);
if (count($path_array) <> 3 || strlen($path_array[0]) <> 2 || strlen($path_array[1]) <> 2) {
unset($languages[$key]);
}
$languages[$key] = str_replace($_SESSION["switch"]['sounds']['dir']."/","",$languages[$key] ?? '');
if (empty($languages[$key])) {
unset($languages[$key]);
}
}
$y=0;
$apps[$x]['destinations'][$y]['type'] = 'array';
$apps[$x]['destinations'][$y]['label'] = 'languages';
$apps[$x]['destinations'][$y]['name'] = 'languages';
$apps[$x]['destinations'][$y]['field']['name'] = 'name';
$apps[$x]['destinations'][$y]['field']['language'] = 'language';
$apps[$x]['destinations'][$y]['field']['dialect'] = 'dialect';
$apps[$x]['destinations'][$y]['field']['voice'] = 'voice';
$apps[$x]['destinations'][$y]['select_value']['dialplan'] = "multiset:^^,sound_prefix=\$\${sounds_dir}/\${language}/\${dialect}/\${voice},default_language=\${language},default_dialect=\${dialect},default_voice=\${voice}";
$apps[$x]['destinations'][$y]['select_value']['ivr'] = "menu-exec-app:multiset ^^,sound_prefix=\$\${sounds_dir}/\${language}/\${dialect}/\${voice},default_language=\${language},default_dialect=\${dialect},default_voice=\${voice}";
$apps[$x]['destinations'][$y]['select_label'] = "\${name}";
$z=0;
foreach ($languages as $language) {
$apps[$x]['destinations'][$y]['result']['data'][$z]['name'] = str_replace('/', '-', $language);
$apps[$x]['destinations'][$y]['result']['data'][$z]['language'] = explode('/', $language)[0];
$apps[$x]['destinations'][$y]['result']['data'][$z]['dialect'] = explode('/', $language)[1];
$apps[$x]['destinations'][$y]['result']['data'][$z]['voice'] = explode('/', $language)[2];
$z++;
}
//permission details
$y=0;
$apps[$x]['permissions'][$y]['name'] = "switch_version";