Lines 20-25
use Modern::Perl;
Link Here
|
20 |
use Mojo::Base 'Mojolicious::Controller'; |
20 |
use Mojo::Base 'Mojolicious::Controller'; |
21 |
|
21 |
|
22 |
use Koha::Biblios; |
22 |
use Koha::Biblios; |
|
|
23 |
use Koha::Old::Biblios; |
23 |
use Koha::DateUtils; |
24 |
use Koha::DateUtils; |
24 |
use Koha::Ratings; |
25 |
use Koha::Ratings; |
25 |
use Koha::RecordProcessor; |
26 |
use Koha::RecordProcessor; |
Lines 802-808
sub list {
Link Here
|
802 |
push @prefetch, 'metadata' # don't prefetch metadata if not needed |
803 |
push @prefetch, 'metadata' # don't prefetch metadata if not needed |
803 |
unless $c->req->headers->accept =~ m/application\/json/; |
804 |
unless $c->req->headers->accept =~ m/application\/json/; |
804 |
|
805 |
|
805 |
my $rs = Koha::Biblios->search( undef, { prefetch => \@prefetch }); |
806 |
my $deleted = delete $c->param->{deleted}; |
|
|
807 |
|
808 |
my $rs = $deleted ? Koha::Old::Biblios->search() : Koha::Biblios->search( undef, { prefetch => \@prefetch } ); |
806 |
my $biblios = $c->objects->search_rs( $rs, [(sub{ $rs->api_query_fixer( $_[0], '', $_[1] ) })] ); |
809 |
my $biblios = $c->objects->search_rs( $rs, [(sub{ $rs->api_query_fixer( $_[0], '', $_[1] ) })] ); |
807 |
|
810 |
|
808 |
return try { |
811 |
return try { |