From b468a6176fc5745bde3db8dfe251d4c9da8665c7 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Mon, 25 Apr 2022 22:43:23 +0000 Subject: [PATCH] Bug 30510: Return only the count from the new filecount method --- Koha/Patron.pm | 2 +- koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Koha/Patron.pm b/Koha/Patron.pm index 6f3e07c7b7..f851080dc0 100644 --- a/Koha/Patron.pm +++ b/Koha/Patron.pm @@ -445,7 +445,7 @@ sub filecount { my ( $self ) = @_; my $files = Koha::Patron::Files->new( borrowernumber => $self->borrowernumber )->GetFilesInfo(); - return $files; + return scalar @{$files}; } =head3 library diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc index dfb976f70d..4c3755ad60 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc @@ -159,7 +159,7 @@ [% END %] [% IF CAN_user_borrowers_edit_borrowers %] [% IF ( EnableBorrowerFiles ) %] - [% IF ( borrower_files ) %]
  • [% ELSE %]
  • [% END %]Files ([% patron.filecount.size | html%])
  • + [% IF ( borrower_files ) %]
  • [% ELSE %]
  • [% END %]Files ([% patron.filecount | html%])
  • [% END %] [% END %] -- 2.30.2