From c3f3015840dc737c1476534c089ac68c05cf1a3d Mon Sep 17 00:00:00 2001 From: Amy King Date: Tue, 19 Jan 2021 03:27:27 +0000 Subject: [PATCH] Bug 27011: Remove unused $name variable The variable is no longer used in the template, it has been removed by: commit 76eb3a0549efe4c1f1557071a6cb4b33d4bd3e4d Bug 18789: (follow-up) Pass a Koha::Patron object from returns.pl - [% name %] + [% INCLUDE 'patron-title.inc' patron=patron %] We can simply remove the $name variable from the controller script. Test Plan: 1. Check out a book 2. Check in a book 3. Note what happens 4. Apply patch 5. Repeat step 1-2 6. Note that it doesn't break and everything still works JD Amended patch: fix commit message Signed-off-by: Andrew Fuerste-Henry Signed-off-by: Martin Renvoize Signed-off-by: Jonathan Druart (cherry picked from commit 113992e620095aac59253cf653acfa47f1ec7768) Signed-off-by: Fridolin Somers (cherry picked from commit 6a4541776e4b8f6176de7ba85e2f2011574ddd5c) Signed-off-by: Andrew Fuerste-Henry (cherry picked from commit 5f21cda35b9ad7ed21d2521b7384f7e7256d49de) Signed-off-by: Victor Grousset/tuxayo --- circ/returns.pl | 3 --- 1 file changed, 3 deletions(-) diff --git a/circ/returns.pl b/circ/returns.pl index f3fd254ef4..85ae0a7b05 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -169,14 +169,12 @@ if ( $query->param('reserve_id') ) { my ( $messages, $nextreservinfo ) = GetOtherReserves($itemnumber); my $patron = Koha::Patrons->find( $nextreservinfo ); - my $name = $patron ? $patron->surname . ", " . $patron->title . " " . $patron->firstname : ''; if ( $messages->{'transfert'} ) { $template->param( itemtitle => $biblio->title, itemnumber => $item->itemnumber, itembiblionumber => $biblio->biblionumber, iteminfo => $biblio->author, - name => $name, patron => $patron, diffbranch => 1, ); @@ -397,7 +395,6 @@ if ( $messages->{'WrongTransfer'} and not $messages->{'WasTransfered'}) { my $reserve = $messages->{'ResFound'}; if ( $reserve ) { my $patron = Koha::Patrons->find( $reserve->{'borrowernumber'} ); - my $name = $patron->surname . ", " . $patron->title . " " . $patron->firstname; $template->param( patron => $patron, ); -- 2.39.5