Fix double init (#1550)

This commit is contained in:
Xavier Guimard 2018-11-29 21:12:43 +01:00
parent 6002b3baa6
commit f6f1072ef6
2 changed files with 5 additions and 5 deletions

View File

@ -9,10 +9,10 @@ sub new {
die 'Custom Auth module not defined';
}
eval $self->{p}->loadModule( $self->{conf}->{customAuth} );
($@)
? return $self->{p}->loadModule( $self->{conf}->{customAuth} )
: die 'Unable to load Auth module ' . $self->{conf}->{customAuth};
my $res;
eval { $res = $self->{p}->loadModule( $self->{conf}->{customAuth} ) };
die 'Unable to load Auth module ' . $self->{conf}->{customAuth} if ($@);
return $res;
}
sub getDisplayType {

View File

@ -27,7 +27,7 @@ sub loadModule {
$nc = $self->conf;
}
return 0
unless ( $obj = $self->p->loadModule( "$plugin", $nc ) and $obj->init );
unless ( $obj = $self->p->loadModule( "$plugin", $nc ) );
return $obj;
}