diff --git a/app/music_on_hold/music_on_hold.php b/app/music_on_hold/music_on_hold.php index a8e61d7a0b..a820e1a97c 100644 --- a/app/music_on_hold/music_on_hold.php +++ b/app/music_on_hold/music_on_hold.php @@ -146,9 +146,10 @@ if (($_POST['submit'] == "Upload") && is_uploaded_file($_FILES['upload_file']['t //$array = array_merge($array, glob($music_on_hold_dir."/*/*", GLOB_ONLYDIR)); $array = array_merge($array, glob($music_on_hold_dir."/*/*/*", GLOB_ONLYDIR)); //list the categories + $moh_xml = ""; foreach($array as $moh_dir) { //set the directory - $moh_dir = substr($dir, strlen($music_on_hold_dir."/")); + $moh_dir = substr($moh_dir, strlen($music_on_hold_dir."/")); //get and set the rate $sub_array = explode("/", $moh_dir); $moh_rate = end($sub_array); @@ -158,7 +159,7 @@ if (($_POST['submit'] == "Upload") && is_uploaded_file($_FILES['upload_file']['t $moh_name = "default/$moh_rate"; } //build the xml - $moh_xml = " \n"; + $moh_xml .= " \n"; $moh_xml .= " \n"; $moh_xml .= " \n"; $moh_xml .= " \n";