BugFix-Double default moh (#1639)

because app_defaults now deals with detecting the default music we don't
need to forcefully put it on the list
if default is detected name it using the $text['opt-default']
This commit is contained in:
Mafoo 2016-06-08 22:40:05 +01:00 committed by FusionPBX
parent 27dc84b3b8
commit c5e1e2f36f
1 changed files with 3 additions and 1 deletions

View File

@ -98,7 +98,6 @@ include "root.php";
$language = new text;
$text = $language->get(null, 'app/music_on_hold');
$moh_list[''] = $text['opt-default'];
$music_on_hold_dir = $_SESSION["switch"]["sounds"]["dir"]."/music";
$array = array_merge(glob($music_on_hold_dir."/*/*", GLOB_ONLYDIR), glob($music_on_hold_dir."/".$_SESSION['domain_name']."/*/*", GLOB_ONLYDIR));
foreach($array as $moh_dir) {
@ -121,6 +120,9 @@ include "root.php";
else {
$moh_value = "local_stream://".$moh_name;
}
if($moh_name == 'default') {
$moh_name = $text['opt-default'];
}
$moh_list[$moh_value] = str_replace('_', ' ', $moh_name);
}
return $moh_list;