Replace folder with directory on extension music on hold.
This commit is contained in:
@@ -1143,26 +1143,26 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||||||
echo "<td width=\"70%\" class='vtable' align='left'>\n";
|
echo "<td width=\"70%\" class='vtable' align='left'>\n";
|
||||||
echo " <select class='formfld' name='hold_music' id='hold_music' style='width: auto;'>\n";
|
echo " <select class='formfld' name='hold_music' id='hold_music' style='width: auto;'>\n";
|
||||||
echo " <option value='' style='font-style: italic;'>Default</option>\n";
|
echo " <option value='' style='font-style: italic;'>Default</option>\n";
|
||||||
$dir_music_on_hold = $_SESSION['switch']['sounds']['dir'].'/music';
|
$music_on_hold_dir = $_SESSION['switch']['sounds']['dir'].'/music';
|
||||||
if (count($_SESSION['domains']) > 1) {
|
if (count($_SESSION['domains']) > 1) {
|
||||||
$dir_music_on_hold_category_parent_folder = $dir_music_on_hold."/".$_SESSION['domain_name'];
|
$music_on_hold_category_parent_dir = $music_on_hold_dir."/".$_SESSION['domain_name'];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$dir_music_on_hold_category_parent_folder = $dir_music_on_hold;
|
$music_on_hold_category_parent_dir = $music_on_hold_dir;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($handle = opendir($dir_music_on_hold_category_parent_folder)) {
|
if ($handle = opendir($music_on_hold_category_parent_dir)) {
|
||||||
while (false !== ($folder = readdir($handle))) {
|
while (false !== ($directory = readdir($handle))) {
|
||||||
if (
|
if (
|
||||||
$folder != "." &&
|
$directory != "." &&
|
||||||
$folder != ".." &&
|
$directory != ".." &&
|
||||||
$folder != "8000" &&
|
$directory != "8000" &&
|
||||||
$folder != "16000" &&
|
$directory != "16000" &&
|
||||||
$folder != "32000" &&
|
$directory != "32000" &&
|
||||||
$folder != "48000" &&
|
$directory != "48000" &&
|
||||||
is_dir($dir_music_on_hold_category_parent_folder."/".$folder)
|
is_dir($music_on_hold_category_parent_dir."/".$directory)
|
||||||
) {
|
) {
|
||||||
echo "<option value='".$folder."' ".(($hold_music == $folder)?'selected':null).">".(str_replace('_', ' ', $folder))."</option>\n";
|
echo "<option value='".$directory."' ".(($hold_music == $directory)?'selected':null).">".(str_replace('_', ' ', $directory))."</option>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
closedir($handle);
|
closedir($handle);
|
||||||
|
|||||||
Reference in New Issue
Block a user