Bugzilla – Attachment 97862 Details for
Bug 23237
Add support for [% INCLUDE %] in plugin templates
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23237: Fix PLUGIN_DIR parameter in master/19.11
Bug-23237-Fix-PLUGINDIR-parameter-in-master1911.patch (text/plain), 1.81 KB, created by
Frédéric Demians
on 2020-01-24 09:22:25 UTC
(
hide
)
Description:
Bug 23237: Fix PLUGIN_DIR parameter in master/19.11
Filename:
MIME Type:
Creator:
Frédéric Demians
Created:
2020-01-24 09:22:25 UTC
Size:
1.81 KB
patch
obsolete
>From f2a4072d06c2ab6481cdba2f241e6b19afa4570a Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?= <f.demians@tamil.fr> >Date: Fri, 24 Jan 2020 10:16:30 +0100 >Subject: [PATCH] Bug 23237: Fix PLUGIN_DIR parameter in master/19.11 > >Method get_plugin_dir() is not correct when plugin_dirs parameter is repeated >in koha-conf.xml. A new method bundle_path() must be used instead. > >bundle_dir() is available in 19.11 and after. So the new patch must not be >backported to 19.05 and 18.11. As it is the usage of the new template parameter >PLUGIN_DIR will be OK in 18.11 and 19.05 as soon as plugins_dir parameter is >unique in koha-conf.xml. > >Thanks Thomas >--- > 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 6a723c0..cf2f8ea 100644 >--- a/Koha/Plugins/Base.pm >+++ b/Koha/Plugins/Base.pm >@@ -168,7 +168,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(), > ); > > return $template; >@@ -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.7.4
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 23237
:
91128
|
91374
|
91875
|
91876
| 97862