Fix single tenant music on hold.

This commit is contained in:
Mark Crane 2012-11-18 06:32:01 +00:00
parent 73127d510c
commit eec73dfc48
2 changed files with 6 additions and 3 deletions

View File

@ -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;
}

View File

@ -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));
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) {