Bug 25131: (QA follow-up) Move test for needs_install outside the plugin
This follow-up patch moves the check outside the register routine. The Mojo plugin won't be loaded unless there's no need to install. As the original tests rely on V1.pm to be able to load the plugin, they are still valid, and they should still pass as there's no behaviour change. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
be618ab400
commit
75f3cb5680
|
|
@ -45,8 +45,7 @@ sub register {
|
|||
|
||||
my @plugins;
|
||||
|
||||
if ( C4::Context->config("enable_plugins") and
|
||||
! C4::Context->needs_install ) # Koha is installed
|
||||
if ( C4::Context->config("enable_plugins") )
|
||||
{
|
||||
# plugin needs to define a namespace
|
||||
@plugins = Koha::Plugins->new()->GetPlugins(
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ sub startup {
|
|||
spec => $spec,
|
||||
validator => undef
|
||||
}
|
||||
);
|
||||
) unless C4::Context->needs_install; # load only if Koha is installed
|
||||
|
||||
$self->plugin(
|
||||
OpenAPI => {
|
||||
|
|
@ -115,7 +115,7 @@ sub startup {
|
|||
spec => $spec,
|
||||
validator => $validator
|
||||
}
|
||||
);
|
||||
) unless C4::Context->needs_install; # load only if Koha is installed
|
||||
|
||||
$self->plugin(
|
||||
OpenAPI => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue