From 67acd5ae4050b13f2c87f869f110fcda37ef9f87 Mon Sep 17 00:00:00 2001 From: Josef Moravec Date: Thu, 21 Dec 2017 19:17:20 +0000 Subject: [PATCH] Bug 15752: (QA follow-up) Remove unecessary redirect If the borrowernumber is defined in query, it starts to get information about previous borrower and the new one is taken into account fully on second page reload Signed-off-by: Katrin Fischer --- circ/circulation.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/circ/circulation.pl b/circ/circulation.pl index 46d5ec4..0594b60 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -85,11 +85,13 @@ my $barcodes = []; my $barcode = $query->param('barcode'); my $findborrower; my $autoswitched; +my $borrowernumber = $query->param('borrowernumber'); if (C4::Context->preference("AutoSwitchPatron") && $barcode) { if (Koha::Patrons->search( { cardnumber => $barcode} )->count() > 0) { $findborrower = $barcode; undef $barcode; + undef $borrowernumber; $autoswitched = 1; } } @@ -117,7 +119,6 @@ if ( $barcode || ( defined($barcode) && $barcode eq '0' ) ) { $barcodes = [ uniq @$barcodes ]; my $template_name = q|circ/circulation.tt|; -my $borrowernumber = $query->param('borrowernumber'); my $patron = $borrowernumber ? Koha::Patrons->find( $borrowernumber ) : undef; my $batch = $query->param('batch'); my $batch_allowed = 0; -- 2.1.4