Only show music on hold select if app/music_on_hold directory exists.

This commit is contained in:
Mark Crane 2014-03-04 05:41:28 +00:00
parent c60ad7b87b
commit ae7f672025
1 changed files with 16 additions and 14 deletions

View File

@ -1441,20 +1441,22 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "</td>\n"; echo "</td>\n";
echo "</tr>\n"; echo "</tr>\n";
echo "<tr>\n"; if (is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/music_on_hold')) {
echo "<td width=\"30%\" class='vncell' valign='top' align='left' nowrap='nowrap'>\n"; echo "<tr>\n";
echo " ".$text['label-hold_music'].":\n"; echo "<td width=\"30%\" class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo "</td>\n"; echo " ".$text['label-hold_music'].":\n";
echo "<td width=\"70%\" class='vtable' align='left'>\n"; echo "</td>\n";
require_once "app/music_on_hold/resources/classes/switch_music_on_hold.php"; echo "<td width=\"70%\" class='vtable' align='left'>\n";
$moh= new switch_music_on_hold; require_once "app/music_on_hold/resources/classes/switch_music_on_hold.php";
$moh->select_name = "hold_music"; $moh= new switch_music_on_hold;
$moh->select_value = $hold_music; $moh->select_name = "hold_music";
echo $moh->select(); $moh->select_value = $hold_music;
echo " <br />\n"; echo $moh->select();
echo $text['description-hold_music']."\n"; echo " <br />\n";
echo "</td>\n"; echo $text['description-hold_music']."\n";
echo "</tr>\n"; echo "</td>\n";
echo "</tr>\n";
}
if (if_group("superadmin")) { if (if_group("superadmin")) {
if (strlen($user_context) == 0) { if (strlen($user_context) == 0) {