Skip to content

Commit

Permalink
Move report subroutine so plugin does not have a report method
Browse files Browse the repository at this point in the history
  • Loading branch information
kidclamp committed Jun 6, 2018
1 parent 85fc569 commit 641e09a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Koha/Plugin/Com/ByWaterSolutions/CoverFlow.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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'};
Expand Down
2 changes: 1 addition & 1 deletion Koha/Plugin/Com/ByWaterSolutions/CoverFlow/coverflow.pl
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
my $cgi = new CGI;

my $coverflow = Koha::Plugin::Com::ByWaterSolutions::CoverFlow->new({ cgi => $cgi });
$coverflow->report();
$coverflow->run_report();
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
```
Expand Down

0 comments on commit 641e09a

Please sign in to comment.