Bugzilla – Attachment 47657 Details for
Bug 15743
Allow plugins to embed Perl modules
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 15743: Allow plugins to embed Perl modules
SIGNED-OFF-Bug-15743-Allow-plugins-to-embed-Perl-m.patch (text/plain), 1.71 KB, created by
Mark Tompsett
on 2016-02-04 21:39:36 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 15743: Allow plugins to embed Perl modules
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2016-02-04 21:39:36 UTC
Size:
1.71 KB
patch
obsolete
>From 90bbeabbf0f8588a9a25b10c4f5b63cd91bc999e Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Thu, 4 Feb 2016 17:42:42 +0100 >Subject: [PATCH] [SIGNED-OFF] Bug 15743: Allow plugins to embed Perl modules > >This patch allows plugins to embed Perl modules by ignoring Perl modules >in plugins directory that don't inherit from Koha::Plugins::Base > >TEST PLAN >--------- >1) Edit koha-conf.xml to have enable_plugins set to 1, and > the pluginsdir set to a particular path. >2) Create a dummy plugin file. (e.g. {that path}/Koha/Plugin/Kaboom.pm) >--- BEGIN Kaboom.pm --- >package Koha::Plugin::Kaboom; > >use Modern::Perl; > >our $VERSION = '1'; >1; >--- END Kaboom.pm --- > >3) Sign in to staff client >4) Reports -> Report plugins > -- commented line version explodes. >5) Apply patch >6) Reports -> Report plugins > -- commented line version works. > -- the ?method= portion in the address bar > prevents you from seeing that the plugin > is actually considered, because various > methods are not defined. Delete that > portion of the URL, and you should see > a thin empty second row appear. >7) run koha qa tests > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> >--- > Koha/Plugins.pm | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/Koha/Plugins.pm b/Koha/Plugins.pm >index 9e2d4eb..d905554 100644 >--- a/Koha/Plugins.pm >+++ b/Koha/Plugins.pm >@@ -63,6 +63,8 @@ sub GetPlugins { > > foreach my $plugin_class (@plugin_classes) { > if ( can_load( modules => { $plugin_class => undef } ) ) { >+ next unless $plugin_class->isa('Koha::Plugins::Base'); >+ > my $plugin = $plugin_class->new({ enable_plugins => $self->{'enable_plugins'} }); > > if ($method) { >-- >2.1.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 15743
:
47651
|
47657
|
47696