Update recur_sounds_dir to return an array rather than using a global variable.
This commit is contained in:
@@ -527,12 +527,10 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
}
|
||||
//sounds
|
||||
if ($load_sound) {
|
||||
global $dir_path, $dir_array;
|
||||
$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=".$text["sounds"].">\n";
|
||||
foreach ($dir_array as $key => $value) {
|
||||
foreach ($files as $key => $value) {
|
||||
if (strlen($value) > 0) {
|
||||
if (substr($var, 0, 71) == "\$\${sounds_dir}/\${default_language}/\${default_dialect}/\${default_voice}/") {
|
||||
$var = substr($var, 71);
|
||||
|
||||
Reference in New Issue
Block a user