From 3ad35094adf18097e5c9cd2a5c5675f3f3e4d08a Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 7 Oct 2021 10:14:49 +0200 Subject: [PATCH] Bug 29083: Don't pass _count var Signed-off-by: Jonathan Druart --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt | 6 +++--- opac/opac-user.pl | 4 +--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt index dac477d909..3c6bb1206d 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt @@ -230,7 +230,7 @@ [% END %] [% IF ( RESERVES.count ) %]
  • Holds ([% RESERVES.count | html %])
  • [% END %] - [% IF Koha.Preference('ArticleRequests') %]
  • Article requests ([% current_article_requests_count || 0 | html %])
  • [% END %] + [% IF Koha.Preference('ArticleRequests') %]
  • Article requests ([% current_article_requests.size || 0 | html %])
  • [% END %] [% IF ( OverDriveCirculation ) %]
  • OverDrive account
  • [% END %] @@ -765,7 +765,7 @@ [% IF Koha.Preference('ArticleRequests') %]
    - [% IF current_article_requests_count %] + [% IF current_article_requests.size %] @@ -866,7 +866,7 @@
    Article requests Article requests
    You have no article requests currently.
    - [% END # IF current_article_requests_count %] + [% END # IF current_article_requests.size %]
    [% END %] diff --git a/opac/opac-user.pl b/opac/opac-user.pl index 0515b162a3..3b72d2fb98 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -387,10 +387,8 @@ if ( C4::Context->preference('AllowPatronToSetFinesVisibilityForGuarantor') } if ( C4::Context->preference("ArticleRequests") ) { - my @current_article_requests = $patron->article_requests->filter_by_current->as_list; $template->param( - current_article_requests => \@current_article_requests, - current_article_requests_count => scalar @current_article_requests, + current_article_requests => [$patron->article_requests->filter_by_current->as_list], ); } -- 2.39.5