Bugzilla – Attachment 125668 Details for
Bug 28303
Having multiple pluginsdir causes plugin_upload to try to write to the opac-tmpl folder
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28303: Fix plugins system with multiple pluginsdir settings
Bug-28303-Fix-plugins-system-with-multiple-plugins.patch (text/plain), 1.51 KB, created by
Joonas Kylmälä
on 2021-10-03 10:59:52 UTC
(
hide
)
Description:
Bug 28303: Fix plugins system with multiple pluginsdir settings
Filename:
MIME Type:
Creator:
Joonas Kylmälä
Created:
2021-10-03 10:59:52 UTC
Size:
1.51 KB
patch
obsolete
>From 4b59e2eaa2dab094e6a80fc31fbc5ff68d1056be Mon Sep 17 00:00:00 2001 >From: Michael Hafen <michael.hafen@washk12.org> >Date: Fri, 7 May 2021 14:13:49 -0600 >Subject: [PATCH] Bug 28303: Fix plugins system with multiple pluginsdir > settings >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >C4/Templates::badtemplatecheck mucks with the config('pluginsdir') array ref. >This makes sure it operates on a copy of the array. > >To test: > 1) $ prove t/db_dependent/Templates.t > >Signed-off-by: David Nind <david@davidnind.com> >JK: Fix commit message styling and add test plan > >Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> >--- > C4/Templates.pm | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > >diff --git a/C4/Templates.pm b/C4/Templates.pm >index f6fefaa6fa..d41c9b534e 100644 >--- a/C4/Templates.pm >+++ b/C4/Templates.pm >@@ -186,9 +186,14 @@ sub badtemplatecheck { > # This also includes two dots > Koha::Exceptions::NoPermission->throw( 'bad template path' ); > } else { >- # Check allowed dirs >+ # Check allowed dirs - make sure we operate on a copy of the config > my $dirs = C4::Context->config("pluginsdir"); >- $dirs = [ $dirs ] if !ref($dirs); >+ if ( !ref($dirs) ) { >+ $dirs = [ $dirs ]; >+ } >+ else { >+ $dirs = [ @$dirs ]; >+ } > unshift @$dirs, C4::Context->config('opachtdocs'), C4::Context->config('intrahtdocs'); > my $found = 0; > foreach my $dir ( @$dirs ) { >-- >2.20.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 28303
:
120722
|
123444
|
125667
| 125668