Bugzilla – Attachment 112295 Details for
Bug 26803
Fix PLUGIN_DIR when plugin_dirs is multivalued
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26803 - Fix PLUGIN_DIR when plugin_dirs is multivalued
Bug-26803---Fix-PLUGINDIR-when-plugindirs-is-multi.patch (text/plain), 1.66 KB, created by
Frédéric Demians
on 2020-10-23 16:21:39 UTC
(
hide
)
Description:
Bug 26803 - Fix PLUGIN_DIR when plugin_dirs is multivalued
Filename:
MIME Type:
Creator:
Frédéric Demians
Created:
2020-10-23 16:21:39 UTC
Size:
1.66 KB
patch
obsolete
>From 5e74aa9c0fc4a22654b096ce2e01025e31e37be3 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?= <f.demians@tamil.fr> >Date: Fri, 23 Oct 2020 18:17:49 +0200 >Subject: [PATCH] Bug 26803 - Fix PLUGIN_DIR when plugin_dirs is multivalued > >When plugin_dir koha-conf.xml parameter contains more than one >directory, PLUGIN_DIR parameter sent to templates doesn't contain the >proper value, ie the base directory of the current plugin. > >See bug 23237 >--- > Koha/Plugins/Base.pm | 18 +----------------- > 1 file changed, 1 insertion(+), 17 deletions(-) > >diff --git a/Koha/Plugins/Base.pm b/Koha/Plugins/Base.pm >index f1990aea45..a5cb15e3c1 100644 >--- a/Koha/Plugins/Base.pm >+++ b/Koha/Plugins/Base.pm >@@ -167,7 +167,7 @@ sub get_template { > CLASS => $self->{'class'}, > METHOD => scalar $self->{'cgi'}->param('method'), > PLUGIN_PATH => $self->get_plugin_http_path(), >- PLUGIN_DIR => $self->get_plugin_dir(), >+ PLUGIN_DIR => $self->bundle_path(), > LANG => C4::Languages::getlanguage($self->{'cgi'}), > ); > >@@ -215,22 +215,6 @@ sub get_plugin_http_path { > return "/plugin/" . join( '/', split( '::', $self->{'class'} ) ); > } > >-=head2 get_plugin_dir >- >-To [% INCLUDE %] another TT template from a template, an absolute path to the >-template is required. This method returns that absolute file system path. >- >-usage: my $path = $self->get_plugin_dir(); >- >-=cut >- >-sub get_plugin_dir { >- my ($self) = @_; >- >- my $base = C4::Context->config('pluginsdir'); >- return "$base/" . join( '/', split( '::', $self->{'class'} ) ); >-} >- > =head2 go_home > > go_home is a quick redirect to the Koha plugins home page >-- >2.17.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 26803
:
112295
|
112362
|
112518