Bug 38102: Fix limit to 50 items in the checkout history - OPAC
Checkout history does not limit to 50 items, it's a regression from bug
33949.
To limit to 50 items we need to use "rows", not "limit".
Test plan:
Have more than 50 checkouts and confirm that by default the table only
displays 50 entries.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit dd28d473cd)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This commit is contained in:
parent
ba821f58fb
commit
ef5e67a6ce
|
|
@ -66,23 +66,23 @@ $limit //= '';
|
|||
$limit = ( $limit eq 'full' ) ? 0 : 50;
|
||||
|
||||
my $checkouts = [
|
||||
$patron->checkouts(
|
||||
$patron->checkouts->search(
|
||||
{},
|
||||
{
|
||||
order_by => $order,
|
||||
prefetch => { item => { biblio => 'biblioitems' } },
|
||||
( $limit ? ( limit => $limit ) : () ),
|
||||
( $limit ? ( rows => $limit ) : () ),
|
||||
}
|
||||
)->as_list
|
||||
];
|
||||
$limit -= scalar(@$checkouts) if $limit;
|
||||
my $old_checkouts = [
|
||||
$patron->old_checkouts(
|
||||
$patron->old_checkouts->search(
|
||||
{},
|
||||
{
|
||||
order_by => $order,
|
||||
prefetch => { item => { biblio => 'biblioitems' } },
|
||||
( $limit ? ( limit => $limit ) : () ),
|
||||
( $limit ? ( rows => $limit ) : () ),
|
||||
}
|
||||
)->as_list
|
||||
];
|
||||
|
|
|
|||
Loading…
Reference in New Issue