From 6def929de4a72fb8d6a9cac59419daa87807c500 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 30 Mar 2015 12:05:57 +0200 Subject: [PATCH] Bug 13894: Fix if the search returns only 1 result In the case where only 1 result is returned by the search, the borrowernumber should be passed correctly. Signed-off-by: Tomas Cohen Arazi --- koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt | 2 +- reserve/request.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index 0576020e21..f72f32ecc2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -487,7 +487,7 @@ No patron matched [% message %] [% END %] -[% IF ( selectborrower ) %] +[% IF ( borrowers ) %] [% INCLUDE 'patron-toolbar.inc' %]
diff --git a/reserve/request.pl b/reserve/request.pl index 7d9c5e617f..f56079fced 100755 --- a/reserve/request.pl +++ b/reserve/request.pl @@ -116,7 +116,7 @@ if ($findborrower) { ); my $borrowers = $results->{patrons}; if ( scalar @$borrowers == 1 ) { - $borrowernumber_hold = $borrower->[0]->{borrowernumber}; + $borrowernumber_hold = $borrowers->[0]->{borrowernumber}; } elsif ( @$borrowers ) { $template->param( borrowers => $borrowers ); } else { -- 2.39.5