diff --git a/app/music_on_hold/music_on_hold.php b/app/music_on_hold/music_on_hold.php index 4709f17055..1af4c9b479 100644 --- a/app/music_on_hold/music_on_hold.php +++ b/app/music_on_hold/music_on_hold.php @@ -50,7 +50,6 @@ if ($_GET['a'] == "download") { if ($category_dir != '') { $path_mod = $category_dir."/"; - if (count($_SESSION['domains']) > 1) { $path_mod = $_SESSION["domain_name"]."/".$path_mod; } diff --git a/app/music_on_hold/resources/classes/switch_music_on_hold.php b/app/music_on_hold/resources/classes/switch_music_on_hold.php index 074df51512..f78fa6560b 100644 --- a/app/music_on_hold/resources/classes/switch_music_on_hold.php +++ b/app/music_on_hold/resources/classes/switch_music_on_hold.php @@ -106,8 +106,12 @@ include "root.php"; //default category $array = glob($music_on_hold_dir."/{8000,16000,32000,48000}", GLOB_ONLYDIR|GLOB_BRACE); //other categories - //$array = array_merge($array, glob($music_on_hold_dir."/*/*", GLOB_ONLYDIR)); - $array = array_merge($array, glob($music_on_hold_dir."/*/*/*", GLOB_ONLYDIR)); + if (count($_SESSION['domains']) > 1) { + $array = array_merge($array, glob($music_on_hold_dir."/*/*/*", GLOB_ONLYDIR)); + } + else { + $array = array_merge($array, glob($music_on_hold_dir."/*/*", GLOB_ONLYDIR)); + } //list the categories $moh_xml = ""; foreach($array as $moh_dir) {