fix
This commit is contained in:
parent
f95edce268
commit
98516736ef
|
@ -12,8 +12,18 @@ if(!function_exists("read_config")) {
|
|||
|
||||
$files = retrieve_storage_files("config");
|
||||
foreach($files as $file) {
|
||||
$ini = array();
|
||||
|
||||
if(check_file_extension($file, "ini.php", array("multiple" => true))) {
|
||||
$ini = parse_ini_file(include($file));
|
||||
$ini = parse_ini_string(include($file));
|
||||
} elseif(check_file_extension($file, "config.php", array("multiple" => true))) {
|
||||
$name = basename($file, ".config.php");
|
||||
$ini[$name] = include($file);
|
||||
} elseif(check_file_extension($file, "ini")) {
|
||||
$ini = parse_ini_file($file);
|
||||
}
|
||||
|
||||
if(count($ini) > 0) {
|
||||
foreach($ini as $k=>$v) {
|
||||
$config[$k] = $v;
|
||||
}
|
||||
|
|
|
@ -316,8 +316,8 @@ if(!function_exists("get_file_extension")) {
|
|||
}
|
||||
|
||||
if(!function_exists("check_file_extension")) {
|
||||
function check_file_extension($file, $extension, $options=array()) {
|
||||
return (get_file_extension($file, $options) === $extension);
|
||||
function check_file_extension($file, $extension) {
|
||||
return (get_file_extension($file) === $extension);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user