Skip to content
Snippets Groups Projects
Commit 1556f7d8 authored by Nigel Kukard's avatar Nigel Kukard
Browse files

Inject configuration groups into our hash

parent 43958703
No related branches found
No related tags found
No related merge requests found
...@@ -123,6 +123,7 @@ sub parseCfgCmdLine ...@@ -123,6 +123,7 @@ sub parseCfgCmdLine
-file => $cfg->{'config_file'}, -file => $cfg->{'config_file'},
-nocase => 1 -nocase => 1
) or die "Failed to open config file '".$cfg->{'config_file'}."': $!"; ) or die "Failed to open config file '".$cfg->{'config_file'}."': $!";
my $inifileHandle = tied( %inifile );
# Copy config # Copy config
my %config = %inifile; my %config = %inifile;
...@@ -168,6 +169,17 @@ sub parseCfgCmdLine ...@@ -168,6 +169,17 @@ sub parseCfgCmdLine
} }
} }
# We may have config file groups we want to remember for other plugins
foreach my $group ($inifileHandle->Groups()) {
# Loop with group members
foreach my $member ($inifileHandle->GroupMembers($group)) {
# Chop off group name and just get the member
my $cleanMember = substr($member,length($group)+1);
# Link the config...
$config{$group}->{$cleanMember} = $config{$member};
}
}
$globals->{'file.config'} = \%config; $globals->{'file.config'} = \%config;
$globals->{'config'} = $cfg; $globals->{'config'} = $cfg;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment