From 641e09a9a9ed667e629ac16451783f47c48b5ca7 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 6 Jun 2018 14:16:11 +0000 Subject: [PATCH] Move report subroutine so plugin does not have a report method --- Koha/Plugin/Com/ByWaterSolutions/CoverFlow.pm | 2 +- Koha/Plugin/Com/ByWaterSolutions/CoverFlow/coverflow.pl | 2 +- README.md | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Koha/Plugin/Com/ByWaterSolutions/CoverFlow.pm b/Koha/Plugin/Com/ByWaterSolutions/CoverFlow.pm index 46c1a77..f6f4851 100644 --- a/Koha/Plugin/Com/ByWaterSolutions/CoverFlow.pm +++ b/Koha/Plugin/Com/ByWaterSolutions/CoverFlow.pm @@ -55,7 +55,7 @@ sub new { ## of running a tool. The difference between a tool and a report is ## primarily semantic, but in general any plugin that modifies the ## Koha database should be considered a tool -sub report { +sub run_report { my ( $self, $args ) = @_; my $cgi = $self->{'cgi'}; diff --git a/Koha/Plugin/Com/ByWaterSolutions/CoverFlow/coverflow.pl b/Koha/Plugin/Com/ByWaterSolutions/CoverFlow/coverflow.pl index 3d67f0d..9862c1a 100755 --- a/Koha/Plugin/Com/ByWaterSolutions/CoverFlow/coverflow.pl +++ b/Koha/Plugin/Com/ByWaterSolutions/CoverFlow/coverflow.pl @@ -12,4 +12,4 @@ my $cgi = new CGI; my $coverflow = Koha::Plugin::Com::ByWaterSolutions::CoverFlow->new({ cgi => $cgi }); -$coverflow->report(); +$coverflow->run_report(); diff --git a/README.md b/README.md index 5d1a19e..15b3d79 100644 --- a/README.md +++ b/README.md @@ -32,13 +32,13 @@ SELECT b.biblionumber, SUBSTRING_INDEX(m.isbn, ' ', 1) AS isbn, b.title LEFT JOIN biblioitems m USING (biblioitemnumber) LEFT JOIN biblio b ON (i.biblionumber=b.biblionumber) WHERE DATE_SUB(CURDATE(),INTERVAL 30 DAY) <= i.dateaccessioned AND m.isbn IS NOT NULL AND m.isbn != '' - HAVING isbn != "" GROUP BY biblionumber + HAVING isbn != "" ORDER BY rand() LIMIT 30 ``` -In the iteration of the plugin, we are using Amazon cover images, but I believe in the end I will make the cover image fetcher configurable so we can use any data source for cover image fetching. **Coce has been added as experimental cover source feel free to test using URL https://coce.bywatersolutions.com** +In this iteration of the plugin, we are using Amazon cover images, a future development would be to make the cover image fetcher configurable so we can use any data source for cover image fetching. **Coce has been added as experimental cover source feel free to test using URL https://coce.bywatersolutions.com** Note: You can add an additional column 'localcover' - this should be blank if the biblio doesn't have a localcover and can contain any other data if it does. If this column is populated a local cover will be used. Example below: ```