@@ -, +, @@ occurrences --- opac/opac-user.pl | 4 ++-- recalls/recalls_to_pull.pl | 4 ++-- recalls/recalls_waiting.pl | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) --- a/opac/opac-user.pl +++ a/opac/opac-user.pl @@ -307,8 +307,8 @@ if ( $pending_checkouts->count ) { # Useless test $issue->{MySummaryHTML} = $my_summary_html; } - my @maybe_recalls = Koha::Recalls->search({ biblionumber => $issue->{biblionumber}, itemnumber => [ undef, $issue->{itemnumber} ], old => undef }); - foreach my $recall ( @maybe_recalls ) { + my $maybe_recalls = Koha::Recalls->search({ biblionumber => $issue->{biblionumber}, itemnumber => [ undef, $issue->{itemnumber} ], old => undef }); + while( my $recall = $maybe_recalls->next ) { if ( $recall->checkout and $recall->checkout->issue_id == $issue->{issue_id} ) { $issue->{recall} = 1; last; --- a/recalls/recalls_to_pull.pl +++ a/recalls/recalls_to_pull.pl @@ -45,7 +45,7 @@ if ( $op eq 'cancel' ) { } if ( $op eq 'list' ) { - my @recalls = Koha::Recalls->search({ status => [ 'R','O','T' ] }); + my @recalls = Koha::Recalls->search({ status => [ 'R','O','T' ] })->as_list; my @pull_list; my %seen_bib; foreach my $recall ( @recalls ) { @@ -57,7 +57,7 @@ if ( $op eq 'list' ) { $seen_bib{$recall->biblionumber}++; # get recall data about this biblio - my @this_bib_recalls = Koha::Recalls->search({ biblionumber => $recall->biblionumber, status => [ 'R','O','T' ] }, { order_by => { -asc => 'recalldate' } }); + my @this_bib_recalls = Koha::Recalls->search({ biblionumber => $recall->biblionumber, status => [ 'R','O','T' ] }, { order_by => { -asc => 'recalldate' } })->as_list; my $recalls_count = scalar @this_bib_recalls; my @unique_patrons = do { my %seen; grep { !$seen{$_->borrowernumber}++ } @this_bib_recalls }; my $patrons_count = scalar @unique_patrons; --- a/recalls/recalls_waiting.pl +++ a/recalls/recalls_waiting.pl @@ -51,7 +51,7 @@ if ( $op eq 'modify' ) { } if ( $op eq 'list' ) { - my @recalls = Koha::Recalls->search({ status => 'W' }); + my @recalls = Koha::Recalls->search({ status => 'W' })->as_list; my $borrower = Koha::Patrons->find( $loggedinuser ); my @over; my $maxdelay = C4::Context->preference('RecallsMaxPickUpDelay') || 7; --