Bugzilla – Attachment 89261 Details for
Bug 22834
Add a method for plugins to return the absolute path for bundled files
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22834: Add Koha::Plugins::Base->bundle_path
Bug-22834-Add-KohaPluginsBase-bundlepath.patch (text/plain), 1.49 KB, created by
Tomás Cohen Arazi (tcohen)
on 2019-05-02 19:16:06 UTC
(
hide
)
Description:
Bug 22834: Add Koha::Plugins::Base->bundle_path
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2019-05-02 19:16:06 UTC
Size:
1.49 KB
patch
obsolete
>From 7b546143355c4f17329f2b02db1a3b0e158fad1f Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 2 May 2019 15:51:30 -0300 >Subject: [PATCH] Bug 22834: Add Koha::Plugins::Base->bundle_path > >This patch adds a 'bundle_path' method that return the base path for >assets included in the plugin. The idea is that it will be used for >calculation of the absolute path in the filesystem for static content. > >To test: >- Apply the unit tests patch >- Run: > $ kshell > k$ prove t/db_dependent/Plugins.t >=> FAIL: The method is not implemented >- Apply this patch >- Run: > k$ prove t/db_dependent/Plugins.t >=> SUCCESS: Tests pass! >- Sign off :-D >--- > Koha/Plugins/Base.pm | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > >diff --git a/Koha/Plugins/Base.pm b/Koha/Plugins/Base.pm >index 2cebe636d9..59b60ef670 100644 >--- a/Koha/Plugins/Base.pm >+++ b/Koha/Plugins/Base.pm >@@ -69,6 +69,8 @@ sub new { > $self->store_data({ '__INSTALLED_VERSION__' => $plugin_version }); > } > >+ $self->{_bundle_path} = abs_path($self->mbf_dir); >+ > return $self; > } > >@@ -210,6 +212,20 @@ sub output_html { > output_with_http_headers( $self->{cgi}, undef, $data, 'html', $status, $extra_options ); > } > >+=head2 bundle_path >+ >+ my $bundle_path = $self->bundle_path >+ >+Returns the directory in which bundled files are. >+ >+=cut >+ >+sub bundle_path { >+ my ($self) = @_; >+ >+ return $self->{_bundle_path}; >+} >+ > =head2 output > > $self->output( $data, $content_type[, $status[, $extra_options]]); >-- >2.21.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 22834
:
89258
|
89259
|
89260
|
89261
|
89660
|
89661
|
89809
|
89810
|
89811
|
90181
|
90182