Update recur_sounds_dir to return an array rather than using a global variable.
This commit is contained in:
@@ -479,11 +479,10 @@
|
||||
}
|
||||
//sounds
|
||||
/*
|
||||
$dir_path = $_SESSION['switch']['sounds']['dir'];
|
||||
recur_sounds_dir($_SESSION['switch']['sounds']['dir']);
|
||||
if (count($dir_array) > 0) {
|
||||
$files = recur_sounds_dir($_SESSION['switch']['sounds']['dir']);
|
||||
if (count($files) > 0) {
|
||||
echo "<optgroup label='Sounds'>\n";
|
||||
foreach ($dir_array as $key => $value) {
|
||||
foreach ($files as $key => $value) {
|
||||
if (strlen($value) > 0) {
|
||||
if (substr($ivr_menu_greet_long, 0, 71) == "\$\${sounds_dir}/\${default_language}/\${default_dialect}/\${default_voice}/") {
|
||||
$ivr_menu_greet_long = substr($ivr_menu_greet_long, 71);
|
||||
@@ -576,11 +575,10 @@
|
||||
|
||||
//sounds
|
||||
/*
|
||||
$dir_path = $_SESSION['switch']['sounds']['dir'];
|
||||
recur_sounds_dir($_SESSION['switch']['sounds']['dir']);
|
||||
if (count($dir_array) > 0) {
|
||||
$files = recur_sounds_dir($_SESSION['switch']['sounds']['dir']);
|
||||
if (count($files) > 0) {
|
||||
echo "<optgroup label='Sounds'>\n";
|
||||
foreach ($dir_array as $key => $value) {
|
||||
foreach ($files as $key => $value) {
|
||||
if (strlen($value) > 0) {
|
||||
if (substr($ivr_menu_greet_short, 0, 71) == "\$\${sounds_dir}/\${default_language}/\${default_dialect}/\${default_voice}/") {
|
||||
$ivr_menu_greet_short = substr($ivr_menu_greet_short, 71);
|
||||
@@ -879,11 +877,10 @@
|
||||
echo "</optgroup>\n";
|
||||
}
|
||||
//sounds
|
||||
$dir_path = $_SESSION['switch']['sounds']['dir'];
|
||||
recur_sounds_dir($_SESSION['switch']['sounds']['dir']);
|
||||
if (count($dir_array) > 0) {
|
||||
$files = recur_sounds_dir($_SESSION['switch']['sounds']['dir']);
|
||||
if (count($files) > 0) {
|
||||
echo "<optgroup label='Sounds'>\n";
|
||||
foreach ($dir_array as $key => $value) {
|
||||
foreach ($files as $key => $value) {
|
||||
if (strlen($value) > 0) {
|
||||
if (substr($ivr_menu_invalid_sound, 0, 71) == "\$\${sounds_dir}/\${default_language}/\${default_dialect}/\${default_voice}/") {
|
||||
$ivr_menu_invalid_sound = substr($ivr_menu_invalid_sound, 71);
|
||||
@@ -975,11 +972,10 @@
|
||||
echo "</optgroup>\n";
|
||||
}
|
||||
//sounds
|
||||
$dir_path = $_SESSION['switch']['sounds']['dir'];
|
||||
recur_sounds_dir($_SESSION['switch']['sounds']['dir']);
|
||||
if (count($dir_array) > 0) {
|
||||
$files = recur_sounds_dir($_SESSION['switch']['sounds']['dir']);
|
||||
if (count($files) > 0) {
|
||||
echo "<optgroup label='Sounds'>\n";
|
||||
foreach ($dir_array as $key => $value) {
|
||||
foreach ($files as $key => $value) {
|
||||
if (strlen($value) > 0) {
|
||||
if (substr($ivr_menu_exit_sound, 0, 71) == "\$\${sounds_dir}/\${default_language}/\${default_dialect}/\${default_voice}/") {
|
||||
$ivr_menu_exit_sound = substr($ivr_menu_exit_sound, 71);
|
||||
|
||||
Reference in New Issue
Block a user