Bugzilla – Attachment 103468 Details for
Bug 24631
Plugin metadata should be outside the main class
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24631: Rename META.yml to PLUGIN.yml
Bug-24631-Rename-METAyml-to-PLUGINyml.patch (text/plain), 1.75 KB, created by
Kyle M Hall (khall)
on 2020-04-22 12:31:07 UTC
(
hide
)
Description:
Bug 24631: Rename META.yml to PLUGIN.yml
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2020-04-22 12:31:07 UTC
Size:
1.75 KB
patch
obsolete
>From 46d9c51e00d767783df24733e79c3635a4b53af2 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 22 Apr 2020 08:30:55 -0400 >Subject: [PATCH] Bug 24631: Rename META.yml to PLUGIN.yml > >--- > Koha/Plugins.pm | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/Koha/Plugins.pm b/Koha/Plugins.pm >index 11e60984d4..b7b674f071 100644 >--- a/Koha/Plugins.pm >+++ b/Koha/Plugins.pm >@@ -131,13 +131,13 @@ sub GetPluginsMetadata { > } > )->_resultset->get_column('plugin_class'); > >- my @metafiles = File::Find::Rule->file()->name('META.yml')->in( @pluginsdir ); >+ my @metafiles = File::Find::Rule->file()->name('PLUGIN.yml')->in( @pluginsdir ); > > my @plugins; > while ( my $plugin_class = $plugin_classes->next ) { > my $plugin_path = $plugin_class; > $plugin_path =~ s/::/\//g; # Take class name, transform :: to / to get path >- my $yaml_to_find = "$plugin_path/META.yml"; >+ my $yaml_to_find = "$plugin_path/PLUGIN.yml"; > $plugin_path =~ s/$/.pm/; # Add .pm to the end > > # Find the full path to the file, it's somewhere in the list of metafiles we found when this module as loaded >@@ -146,7 +146,7 @@ sub GetPluginsMetadata { > my $plugin_metadata; > if ( -r $meta_yaml ) { # If the metafile exists and is readable, use it > $plugin_metadata = YAML::LoadFile($meta_yaml); >- } else { # Fall back to loading the plugin to get the metadata if there is no META.yml file to read >+ } else { # Fall back to loading the plugin to get the metadata if there is no PLUGIN.yml file to read > load $plugin_class; > my $plugin = $plugin_class->new({ > enable_plugins => $self->{'enable_plugins'} >-- >2.24.2 (Apple Git-127)
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 24631
:
103092
|
103467
|
103468
|
103656
|
103722
|
103982
|
103983
|
104023
|
104024
|
104256
|
104266
|
104270