Bugzilla – Attachment 90848 Details for
Bug 23171
The plugin_methods table should not include imported methods
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23171: Only record actual plugin methods
Bug-23171-Only-record-actual-plugin-methods.patch (text/plain), 1.29 KB, created by
Martin Renvoize (ashimema)
on 2019-06-20 12:43:41 UTC
(
hide
)
Description:
Bug 23171: Only record actual plugin methods
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-06-20 12:43:41 UTC
Size:
1.29 KB
patch
obsolete
>From 82e93d5ece0851faf393f2a0a81c68e7e9f822f0 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 20 Jun 2019 13:37:07 +0100 >Subject: [PATCH] Bug 23171: Only record actual plugin methods > >--- > Koha/Plugins.pm | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > >diff --git a/Koha/Plugins.pm b/Koha/Plugins.pm >index 9dc42c5155..4ada720114 100644 >--- a/Koha/Plugins.pm >+++ b/Koha/Plugins.pm >@@ -139,11 +139,16 @@ sub InstallPlugins { > > Koha::Plugins::Methods->search({ plugin_class => $plugin_class })->delete(); > >- foreach my $method ( @{ Class::Inspector->methods( $plugin_class, 'public' ) } ) { >+ foreach my $method (@{Class::Inspector->methods( $plugin_class, 'public', 'full' )}){ >+ my ( $method_class, $plugin_method ) = $method =~ /^(.*)::(.*)$/; >+ >+ # Skip method not directly owned by the plugin class >+ next if (!$method_class || $method_class ne $plugin_class); >+ > Koha::Plugins::Method->new( > { > plugin_class => $plugin_class, >- plugin_method => $method, >+ plugin_method => $plugin_method, > } > )->store(); > } >-- >2.20.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 23171
: 90848