Bug 38362: Fix printing lists on opac/opac-shelves.pl

To test from the OPAC:
1 - create a list with more than 10 items
2 - print the list -> there is a pagination and that only 10 items
  are printed
3 - Apply patch
4 - print the list again -> every items are being printed

Signed-off-by: Sam Sowanick <sam.sowanick@corvallisoregon.gov>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Tidied: added a few spaces.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Lucas Gass 2024-11-05 22:13:32 +00:00 committed by Katrin Fischer
parent 9fe129c76e
commit 8d0e7ff906
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 3 additions and 1 deletions

View File

@ -317,7 +317,9 @@ if ( $op eq 'view' ) {
$sortfield = 'title' if !$sortfield or !grep { $_ eq $sortfield } qw( title author copyrightdate itemcallnumber dateadded );
my $rows;
unless ( $query->param('print') or $query->param('rss') ) {
if ( $query->param('print') or $query->param('rss') ) {
$page = "";
} else {
$rows = C4::Context->preference('OPACnumSearchResults') || 20;
}
my $order_by = $sortfield eq 'itemcallnumber' ? 'items.cn_sort' : $sortfield;