Bugzilla – Attachment 103015 Details for
Bug 25131
Web installer broken if enable_plugin is set
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25131: (QA follow-up) Move test for needs_install outside the plugin
Bug-25131-QA-follow-up-Move-test-for-needsinstall-.patch (text/plain), 1.89 KB, created by
Tomás Cohen Arazi
on 2020-04-15 14:50:37 UTC
(
hide
)
Description:
Bug 25131: (QA follow-up) Move test for needs_install outside the plugin
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi
Created:
2020-04-15 14:50:37 UTC
Size:
1.89 KB
patch
obsolete
>From e1a39c8c79b6da4eba0fd7a44d4ad2b913ffd21e Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Wed, 15 Apr 2020 11:48:23 -0300 >Subject: [PATCH] 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> >--- > Koha/REST/Plugin/PluginRoutes.pm | 3 +-- > Koha/REST/V1.pm | 4 ++-- > 2 files changed, 3 insertions(+), 4 deletions(-) > >diff --git a/Koha/REST/Plugin/PluginRoutes.pm b/Koha/REST/Plugin/PluginRoutes.pm >index 67ff2ae1cf..a90eb81133 100644 >--- a/Koha/REST/Plugin/PluginRoutes.pm >+++ b/Koha/REST/Plugin/PluginRoutes.pm >@@ -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( >diff --git a/Koha/REST/V1.pm b/Koha/REST/V1.pm >index 0b14b97b95..894457b0c8 100644 >--- a/Koha/REST/V1.pm >+++ b/Koha/REST/V1.pm >@@ -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 => { >-- >2.26.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 25131
:
102941
|
102942
|
102943
|
102989
|
102990
|
102991
|
102995
|
102996
|
102997
| 103015 |
104003