From 37689f334b39325aed237574df5996c5ba1b8732 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 18 May 2022 16:17:11 +0100 Subject: [PATCH] Bug 21978: (follow-up) Stop passing holdfor_cardnumber We not longer need to pass holdfor_cardnumber distinctly, we can just refer to holdfor_patron.cardnumber instead. This patch does that ;P Signed-off-by: Jonathan Druart --- catalogue/ISBDdetail.pl | 5 ++--- catalogue/MARCdetail.pl | 5 ++--- catalogue/detail.pl | 3 +-- catalogue/imageviewer.pl | 5 ++--- catalogue/labeledMARCdetail.pl | 5 ++--- catalogue/moredetail.pl | 5 ++--- catalogue/search.pl | 5 ++--- koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt | 4 ++-- .../intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt | 2 +- 10 files changed, 17 insertions(+), 24 deletions(-) diff --git a/catalogue/ISBDdetail.pl b/catalogue/ISBDdetail.pl index 7bb4e61be0f..6e3b4bf845e 100755 --- a/catalogue/ISBDdetail.pl +++ b/catalogue/ISBDdetail.pl @@ -108,9 +108,8 @@ my $res = GetISBDView({ if($query->cookie("holdfor")){ my $holdfor_patron = Koha::Patrons->find( $query->cookie("holdfor") ); $template->param( - holdfor => $query->cookie("holdfor"), - holdfor_patron => $holdfor_patron, - holdfor_cardnumber => $holdfor_patron->cardnumber, + holdfor => $query->cookie("holdfor"), + holdfor_patron => $holdfor_patron, ); } diff --git a/catalogue/MARCdetail.pl b/catalogue/MARCdetail.pl index 8211d58d97b..6bb5a834dd4 100755 --- a/catalogue/MARCdetail.pl +++ b/catalogue/MARCdetail.pl @@ -110,9 +110,8 @@ my $biblio = GetBiblioData($biblionumber); if($query->cookie("holdfor")){ my $holdfor_patron = Koha::Patrons->find( $query->cookie("holdfor") ); $template->param( - holdfor => $query->cookie("holdfor"), - holdfor_patron => $holdfor_patron, - holdfor_cardnumber => $holdfor_patron->cardnumber, + holdfor => $query->cookie("holdfor"), + holdfor_patron => $holdfor_patron, ); } diff --git a/catalogue/detail.pl b/catalogue/detail.pl index 2d8e07698b9..d3ca22f4565 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -103,9 +103,8 @@ if($query->cookie("holdfor")){ my $holdfor_patron = Koha::Patrons->find( $query->cookie("holdfor") ); if ( $holdfor_patron ) { $template->param( - holdfor => $query->cookie("holdfor"), + holdfor => $query->cookie("holdfor"), holdfor_patron => $holdfor_patron, - holdfor_cardnumber => $holdfor_patron->cardnumber, ); } } diff --git a/catalogue/imageviewer.pl b/catalogue/imageviewer.pl index 2fede23b02c..1fc1f423048 100755 --- a/catalogue/imageviewer.pl +++ b/catalogue/imageviewer.pl @@ -49,9 +49,8 @@ my @items = GetItemsInfo($biblionumber); if ( $query->cookie("holdfor") ) { my $holdfor_patron = Koha::Patrons->find( $query->cookie("holdfor") ); $template->param( - holdfor => $query->cookie("holdfor"), - holdfor_patron => $holdfor_patron, - holdfor_cardnumber => $holdfor_patron->cardnumber, + holdfor => $query->cookie("holdfor"), + holdfor_patron => $holdfor_patron, ); } diff --git a/catalogue/labeledMARCdetail.pl b/catalogue/labeledMARCdetail.pl index 08fbe6aeab3..6418fd0edcb 100755 --- a/catalogue/labeledMARCdetail.pl +++ b/catalogue/labeledMARCdetail.pl @@ -73,9 +73,8 @@ my $biblio = GetBiblioData($biblionumber); if($query->cookie("holdfor")){ my $holdfor_patron = Koha::Patrons->find( $query->cookie("holdfor") ); $template->param( - holdfor => $query->cookie("holdfor"), - holdfor_patron => $holdfor_patron, - holdfor_cardnumber => $holdfor_patron->cardnumber, + holdfor => $query->cookie("holdfor"), + holdfor_patron => $holdfor_patron, ); } diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl index 4d9cf401a13..b0dc6e4206d 100755 --- a/catalogue/moredetail.pl +++ b/catalogue/moredetail.pl @@ -55,9 +55,8 @@ $template->param( if($query->cookie("holdfor")){ my $holdfor_patron = Koha::Patrons->find( $query->cookie("holdfor") ); $template->param( - holdfor => $query->cookie("holdfor"), - holdfor_patron => $holdfor_patron, - holdfor_cardnumber => $holdfor_patron->cardnumber, + holdfor => $query->cookie("holdfor"), + holdfor_patron => $holdfor_patron, ); } diff --git a/catalogue/search.pl b/catalogue/search.pl index 2097f1385a9..24e8692d27e 100755 --- a/catalogue/search.pl +++ b/catalogue/search.pl @@ -203,9 +203,8 @@ if($cgi->cookie("holdfor")){ my $holdfor_patron = Koha::Patrons->find( $cgi->cookie("holdfor") ); if ( $holdfor_patron ) { # may have been deleted in the meanwhile $template->param( - holdfor => $cgi->cookie("holdfor"), - holdfor_patron => $holdfor_patron, - holdfor_cardnumber => $holdfor_patron->cardnumber, + holdfor => $cgi->cookie("holdfor"), + holdfor_patron => $holdfor_patron, ); } } diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc index a6435194b20..a1ca101dbaf 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc @@ -182,7 +182,7 @@ [% ELSE %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt index e17480f0524..c6613d06b18 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt @@ -519,7 +519,7 @@ [% ELSE %] [% IF CAN_user_reserveforothers_place_holds %] Holds ([% Biblio.HoldsCount( SEARCH_RESULT.biblionumber ) | html %]) - [% IF ( holdfor ) %] | Place hold for [% INCLUDE 'patron-title.inc' patron => holdfor_patron no_title => 1 no_cardnumber => 1 %][% END %] + [% IF ( holdfor ) %] | Place hold for [% INCLUDE 'patron-title.inc' patron => holdfor_patron no_title => 1 no_cardnumber => 1 %][% END %] [% IF ( holdforclub ) %] | Place hold for [% holdforclub_name | html %][% END %] [% ELSE %] Holds ([% Biblio.HoldsCount( SEARCH_RESULT.biblionumber ) | html %]) @@ -724,7 +724,7 @@ var PREF_StaffHighlightedWords = "[% Koha.Preference('StaffHighlightedWords') | html %]"; var PREF_NotHighlightedWords = "[% Koha.Preference('NotHighlightedWords') | html %]"; var biblionumber = "[% biblionumber | html %]"; - var holdfor_cardnumber = "[% holdfor_cardnumber | html %]"; + var holdfor_cardnumber = "[% holdfor_patron.cardnumber | html %]"; var holdforclub = "[% holdforclub | html %]"; [% IF SEARCH_RESULTS %] var SEARCH_RESULTS = 1; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt index b57f4b51cc3..e57b49407ec 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt @@ -276,7 +276,7 @@ [% ELSE %] [% IF ( itemsloo.ITEM_RESULTS.size ) %] Holds - [% IF ( holdfor ) %] | Place hold for [% INCLUDE 'patron-title.inc' patron => holdfor_patron no_title => 1 %][% END %] + [% IF ( holdfor ) %] | Place hold for [% INCLUDE 'patron-title.inc' patron => holdfor_patron no_title => 1 %][% END %] [% ELSE %] No holds allowed [% END %] -- 2.25.1