Fix #1282: conf parser didn't check unopened combModules node
This commit is contained in:
parent
0fc127dbe0
commit
6827b4e485
|
@ -712,25 +712,6 @@ sub _scanNodes {
|
|||
next;
|
||||
}
|
||||
|
||||
# combModules: just to replace "over" key
|
||||
elsif ( $name eq 'combModules' ) {
|
||||
hdebug('combModules');
|
||||
$self->newConf->{$name} = {};
|
||||
foreach my $node ( @{ $leaf->{nodes} } ) {
|
||||
my $tmp;
|
||||
$tmp->{$_} = $node->{data}->{$_} foreach (qw(type for));
|
||||
$tmp->{over} = {};
|
||||
foreach ( @{ $node->{data}->{over} } ) {
|
||||
$tmp->{over}->{ $_->[0] } = $_->[1];
|
||||
}
|
||||
$self->newConf->{$name}->{ $node->{title} } = $tmp;
|
||||
}
|
||||
|
||||
# TODO: check changes
|
||||
$self->confChanged(1);
|
||||
next;
|
||||
}
|
||||
|
||||
####################
|
||||
# Other hash nodes #
|
||||
####################
|
||||
|
@ -746,6 +727,26 @@ sub _scanNodes {
|
|||
}
|
||||
else {
|
||||
hdebug(' opened');
|
||||
|
||||
# combModules: just to replace "over" key
|
||||
if ( $name eq 'combModules' ) {
|
||||
hdebug(' combModules');
|
||||
$self->newConf->{$name} = {};
|
||||
foreach my $node ( @{ $leaf->{nodes} } ) {
|
||||
my $tmp;
|
||||
$tmp->{$_} = $node->{data}->{$_} foreach (qw(type for));
|
||||
$tmp->{over} = {};
|
||||
foreach ( @{ $node->{data}->{over} } ) {
|
||||
$tmp->{over}->{ $_->[0] } = $_->[1];
|
||||
}
|
||||
$self->newConf->{$name}->{ $node->{title} } = $tmp;
|
||||
}
|
||||
|
||||
# TODO: check changes
|
||||
$self->confChanged(1);
|
||||
next;
|
||||
}
|
||||
|
||||
$subNodes //= [];
|
||||
my $count = 0;
|
||||
my @old = (
|
||||
|
|
|
@ -225,7 +225,8 @@ sub loadPlugin {
|
|||
}
|
||||
return 0
|
||||
unless ( $obj = $self->p->loadModule( "$plugin", $nc ) );
|
||||
$obj = $self->p->findEP( $plugin, $obj );
|
||||
return 0
|
||||
unless $obj = $self->p->findEP( $plugin, $obj );
|
||||
$obj->{userLogger} = $self->wrapUserLogger;
|
||||
weaken $obj->{userLogger};
|
||||
return $obj;
|
||||
|
|
Loading…
Reference in New Issue
Block a user