diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Engines/Default.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Engines/Default.pm index 0a3892482..a3a1e79a3 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Engines/Default.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Engines/Default.pm @@ -116,13 +116,12 @@ sub init { my $moduleType = $self->conf->{sfExtra}->{$extraKey}->{type}; next unless ($moduleType); + my $over = $self->conf->{sfExtra}->{$extraKey}->{over}; - my %over = %{ $self->conf->{sfExtra}->{$extraKey}->{over} or {} }; $self->logger->debug( "Loading extra 2F module $extraKey of type $moduleType"); my $m = - $self->loadPlugin( "::2F::$moduleType", - { sfPrefix => $extraKey, %over } ) + $self->loadPlugin( "::2F::$moduleType", $over, prefix => $extraKey, ) or return 0; # Rule and prefix may be modified by 2F module, reread them diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Ext2F.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Ext2F.pm index 91cba8f78..ae6b35785 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Ext2F.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Ext2F.pm @@ -43,7 +43,6 @@ sub init { } } - $self->prefix( $self->conf->{sfPrefix} ) if ( $self->conf->{sfPrefix} ); return $self->SUPER::init(); } diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Mail2F.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Mail2F.pm index 40ad8b24b..c2a469515 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Mail2F.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Mail2F.pm @@ -68,8 +68,6 @@ sub init { return 0; } - $self->prefix( $self->conf->{sfPrefix} ) - if ( $self->conf->{sfPrefix} ); return $self->SUPER::init(); } diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/REST.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/REST.pm index df34cd79d..8059d3d82 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/REST.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/REST.pm @@ -66,7 +66,6 @@ sub init { $self->vrfyAttrs->{$k} = $attr; } - $self->prefix( $self->conf->{sfPrefix} ) if ( $self->conf->{sfPrefix} ); return $self->SUPER::init(); } diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Radius.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Radius.pm index 33e46f10e..04d8ad508 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Radius.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Radius.pm @@ -46,8 +46,6 @@ sub init { ) ); - $self->prefix( $self->conf->{sfPrefix} ) - if ( $self->conf->{sfPrefix} ); return $self->SUPER::init(); } diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/OverConf.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/OverConf.pm index d810bb2a3..ba4af3fe2 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/OverConf.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/OverConf.pm @@ -8,15 +8,15 @@ our @overC; # Override portal loadPlugin() to use a wrapped configuration sub loadPlugin { - my ( $self, $plugin, $over ) = @_; - my $obj = $self->loadModule( $plugin, $over ); + my ( $self, $plugin, $over, %args ) = @_; + my $obj = $self->loadModule( $plugin, $over, %args ); return 0 unless ( $obj and $obj = $self->p->findEP( $plugin, $obj ) ); return $obj; } sub loadModule { - my ( $self, $plugin, $over ) = @_; + my ( $self, $plugin, $over, %args ) = @_; my $obj; my $nc; if ($over) { @@ -28,7 +28,7 @@ sub loadModule { $nc = $self->conf; } return 0 - unless ( $obj = $self->p->loadModule( "$plugin", $nc ) ); + unless ( $obj = $self->p->loadModule( "$plugin", $nc, %args ) ); return $obj; }