mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 19:53:56 +00:00
Update the dev branch version to 3.7 and get rid of GLOB_BRACE which is not defined in Solaris
This commit is contained in:
@@ -136,7 +136,17 @@ include "root.php";
|
||||
//build the list of categories
|
||||
$music_on_hold_dir = $_SESSION['switch']['sounds']['dir'].'/music';
|
||||
//default category
|
||||
$array = glob($music_on_hold_dir."/{8000,16000,32000,48000}", GLOB_ONLYDIR|GLOB_BRACE);
|
||||
if (defined("GLOB_BRACE")) {
|
||||
$array = glob($music_on_hold_dir."/{8000,16000,32000,48000}", GLOB_ONLYDIR|GLOB_BRACE);
|
||||
}
|
||||
else {
|
||||
$array_1 = glob($music_on_hold_dir."/8000".$class_name.".php", GLOB_ONLYDIR);
|
||||
$array_2 = glob($music_on_hold_dir."/16000".$class_name.".php", GLOB_ONLYDIR);
|
||||
$array_3 = glob($music_on_hold_dir."/32000".$class_name.".php", GLOB_ONLYDIR);
|
||||
$array_4 = glob($music_on_hold_dir."/48000".$class_name.".php", GLOB_ONLYDIR);
|
||||
$array = array_merge((array)$array_1,(array)$array_2,(array)$array_3,(array)$array_4);
|
||||
unset($array_1,$array_2,$array_3,$array_4);
|
||||
}
|
||||
//other categories
|
||||
if (count($_SESSION['domains']) > 1) {
|
||||
$array = array_merge($array, glob($music_on_hold_dir."/*/*/*", GLOB_ONLYDIR));
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
if (!function_exists('software_version')) {
|
||||
function software_version() {
|
||||
return '3.6.0';
|
||||
return '3.7.0';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -48,13 +48,23 @@
|
||||
}
|
||||
private function loader($class_name) {
|
||||
//use glob to check "/resources/classes", "/{core,app}/*/resources/classes";
|
||||
$results = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "{/*/*,}/resources/classes/".$class_name.".php", GLOB_BRACE);
|
||||
if (defined("GLOB_BRACE")) {
|
||||
$results = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "{/*/*,}/resources/classes/".$class_name.".php", GLOB_BRACE);
|
||||
}
|
||||
else {
|
||||
$array_1 = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/*/resources/classes/".$class_name.".php");
|
||||
$array_2 = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/resources/classes/".$class_name.".php");
|
||||
$results = array_merge((array)$array_1,(array)$array_2);
|
||||
unset($array_1, $array_2);
|
||||
}
|
||||
|
||||
//include the class
|
||||
foreach ($results as &$class_file) {
|
||||
if (!class_exists($class_name)) {
|
||||
include $class_file;
|
||||
}
|
||||
}
|
||||
unset($results);
|
||||
}
|
||||
}
|
||||
$autoload = new auto_loader();
|
||||
|
||||
Reference in New Issue
Block a user