mirror of
https://github.com/unraid/webgui.git
synced 2026-01-15 06:00:14 -06:00
Added custom parse_ini_file/string functions to deal with '#' comment lines
This commit is contained in:
@@ -240,10 +240,10 @@ function transpose_user_path($path) {
|
||||
return $path;
|
||||
}
|
||||
// custom parse_ini_file/string functions to deal with '#' comment lines
|
||||
function my_parse_ini_file($file) {
|
||||
return parse_ini_string(preg_replace('/^#/',';',file_get_contents($file)));
|
||||
function my_parse_ini_file($file, $sections=false, $scanner=INI_SCANNER_NORMAL) {
|
||||
return parse_ini_string(preg_replace('/^#/',';',file_get_contents($file)),$sections,$scanner);
|
||||
}
|
||||
function my_parse_ini_string($string) {
|
||||
return parse_ini_string(preg_replace('/^#/',';',$string));
|
||||
function my_parse_ini_string($text, $sections=false, $scanner=INI_SCANNER_NORMAL) {
|
||||
return parse_ini_string(preg_replace('/^#/',';',$text),$sections,$scanner);
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user