diff --git a/app/call_flows/call_flow_edit.php b/app/call_flows/call_flow_edit.php index eed70c3bd2..d12dcde7fc 100644 --- a/app/call_flows/call_flow_edit.php +++ b/app/call_flows/call_flow_edit.php @@ -527,20 +527,21 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { } //sounds if ($load_sound) { - $files = recur_sounds_dir($_SESSION['switch']['sounds']['dir']); - if (count($files) > 0) { + $file = new file; + $sound_files = $file->sounds(); + if (is_array($sound_files)) { echo "\n"; - foreach ($files as $key => $value) { + foreach ($sound_files as $value) { if (strlen($value) > 0) { if (substr($var, 0, 71) == "\$\${sounds_dir}/\${default_language}/\${default_dialect}/\${default_voice}/") { $var = substr($var, 71); } if ($var == $key) { $tmp_selected = true; - echo " \n"; + echo " \n"; } else { - echo " \n"; + echo " \n"; } } }