Commit f6f1072e authored by Xavier Guimard's avatar Xavier Guimard

Fix double init (#1550)

parent 6002b3ba
...@@ -9,10 +9,10 @@ sub new { ...@@ -9,10 +9,10 @@ sub new {
die 'Custom Auth module not defined'; die 'Custom Auth module not defined';
} }
eval $self->{p}->loadModule( $self->{conf}->{customAuth} ); my $res;
($@) eval { $res = $self->{p}->loadModule( $self->{conf}->{customAuth} ) };
? return $self->{p}->loadModule( $self->{conf}->{customAuth} ) die 'Unable to load Auth module ' . $self->{conf}->{customAuth} if ($@);
: die 'Unable to load Auth module ' . $self->{conf}->{customAuth}; return $res;
} }
sub getDisplayType { sub getDisplayType {
......
...@@ -27,7 +27,7 @@ sub loadModule { ...@@ -27,7 +27,7 @@ sub loadModule {
$nc = $self->conf; $nc = $self->conf;
} }
return 0 return 0
unless ( $obj = $self->p->loadModule( "$plugin", $nc ) and $obj->init ); unless ( $obj = $self->p->loadModule( "$plugin", $nc ) );
return $obj; return $obj;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment