Bugzilla – Attachment 119553 Details for
Bug 28143
@INC filled with duplicates of opachtdocs and intrahtdocs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28143: Copy array before modifying it for testing
Bug-28143-Copy-array-before-modifying-it-for-testi.patch (text/plain), 1.52 KB, created by
Didier Gautheron
on 2021-04-14 09:47:37 UTC
(
hide
)
Description:
Bug 28143: Copy array before modifying it for testing
Filename:
MIME Type:
Creator:
Didier Gautheron
Created:
2021-04-14 09:47:37 UTC
Size:
1.52 KB
patch
obsolete
>From 216080ab01572756433f70c2f7df588e6b2f606e Mon Sep 17 00:00:00 2001 >From: Didier Gautheron <didier.gautheron@biblibre.com> >Date: Tue, 13 Apr 2021 16:52:03 +0200 >Subject: [PATCH] Bug 28143: Copy array before modifying it for testing > >To test: >1. Have a $KOHA_CONF with at least 2 'pluginsdir' entries. You need at least one plugin with a 'tool', 'report', or 'configure' method. This will be useful to trigger the loading of Koha::Plugins::Handler. The KitchenSink module is perfect for that. >2. Start starman with only 1 worker (not necessary but it's easier to reproduce the problem that way) >3. Load staff client home page multiple times >4. Run the plugin method of your choice >5. Go to the About page, you should see the template directories in "Perl @INC" >6. Apply patch >7. Redo 3 >8. No more template directories. >--- > C4/Templates.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/C4/Templates.pm b/C4/Templates.pm >index bad3275959..a43c80b461 100644 >--- a/C4/Templates.pm >+++ b/C4/Templates.pm >@@ -188,8 +188,8 @@ sub badtemplatecheck { > Koha::Exceptions::NoPermission->throw( 'bad template path' ); > } else { > # Check allowed dirs >- my $dirs = C4::Context->config("pluginsdir"); >- $dirs = [ $dirs ] if !ref($dirs); >+ my $cdirs = C4::Context->config("pluginsdir"); >+ my $dirs = [!ref($cdirs)?$cdirs:@$cdirs]; > unshift @$dirs, C4::Context->config('opachtdocs'), C4::Context->config('intrahtdocs'); > my $found = 0; > foreach my $dir ( @$dirs ) { >-- >2.11.0
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 28143
: 119553