mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-02-22 10:56:31 +00:00
Check if the sounds directory exists
This commit is contained in:
@@ -66,9 +66,11 @@ class file {
|
||||
if (!isset($voice)) { $voice = 'callie'; }
|
||||
|
||||
//set the variables
|
||||
$dir = $_SESSION['switch']['sounds']['dir'].'/'.$language.'/'.$dialect.'/'.$voice;
|
||||
$rate = '8000';
|
||||
$files = $this->glob($dir.'/*/'.$rate, true);
|
||||
if (!empty($_SESSION['switch']['sounds']['dir']) && file_exists($_SESSION['switch']['sounds']['dir'])) {
|
||||
$dir = $_SESSION['switch']['sounds']['dir'].'/'.$language.'/'.$dialect.'/'.$voice;
|
||||
$rate = '8000';
|
||||
$files = $this->glob($dir.'/*/'.$rate, true);
|
||||
}
|
||||
|
||||
//loop through the languages
|
||||
if (!empty($files)) {
|
||||
|
||||
Reference in New Issue
Block a user