IVR Menu - If music on hold doesn't exist then don't include it as an option for ring back.

This commit is contained in:
Mark Crane
2014-03-06 17:12:45 +00:00
parent 500e5ce10d
commit cbb18e1ee4

View File

@@ -803,12 +803,20 @@ for ($c = 0; $c < 1; $c++) {
else {
$select_options .= " <option value='\${rs-ring}'>rs-ring</option>\n";
}
require_once "app/music_on_hold/resources/classes/switch_music_on_hold.php";
$moh = new switch_music_on_hold;
$moh->select_name = "ivr_menu_ringback";
$moh->select_value = $ivr_menu_ringback;
$moh->select_options = $select_options;
echo $moh->select();
if (is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/music_on_hold')) {
require_once "app/music_on_hold/resources/classes/switch_music_on_hold.php";
$moh = new switch_music_on_hold;
$moh->select_name = "ivr_menu_ringback";
$moh->select_value = $ivr_menu_ringback;
$moh->select_options = $select_options;
echo $moh->select();
}
else {
echo " <select class='formfld' name='ivr_menu_ringback'>\n";
echo " <option value=''></option>\n";
echo $select_options;
echo " </select>\n";
}
echo "<br />\n";
echo $text['description-ring_back']."\n";