Override portal parameters in Multi even for the first module (#305)

environments/ppa-mbqj77/deployments/1
Clément Oudot 14 years ago
parent 0f8cb9fe1f
commit 8c5277642e
  1. 11
      modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/_Multi.pm

@ -21,6 +21,8 @@ our $VERSION = '1.0.6';
sub new {
my ( $class, $portal ) = splice @_;
my $self = bless { p => $portal, res => PE_NOSCHEME }, $class;
# Browse authentication and userDB configuration
my @stack = ( $portal->{authentication}, $portal->{userDB} );
for ( my $i = 0 ; $i < 2 ; $i++ ) {
$stack[$i] =~ s/^Multi\s*//;
@ -40,7 +42,16 @@ sub new {
push @{ $self->{stack}->[$i] },
{ m => $mod, c => $cond, n => $name };
}
# Override portal settings
%{ $self->{p} } = (
%{ $self->{p} },
%{ $self->{p}->{multi}->{ $self->{stack}->[$i]->[0]->{n} } }
) if ( $self->{p}->{multi}->{ $self->{stack}->[$i]->[0]->{n} } );
}
# Return _Multi object
return $self;
}

Loading…
Cancel
Save