From e4f4fe9d1d9b5344c3244f3f2b0bd1762f03eef0 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. --- 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 0576020..f72f32e 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 7d9c5e6..f56079f 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.1.0