From 563bc3dbd4571f968672a723c6818f43ba2aaca7 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 17 Aug 2018 12:22:50 +0000 Subject: [PATCH] Bug 21242: If not searching for patron, move to log viewer To test: 1 - Bring up a patron 2 - Click 'Modification log' 3 - Note you get borrower info 4 - Move the object field into info field 5 - Submit 6 - You are now on the 'Log viewer' page with admin options, not borrower circ options Signed-off-by: Owen Leonard Signed-off-by: Katrin Fischer Signed-off-by: Nick Clemens (cherry picked from commit 411e78864918c909feffeadb341db37cea0a4393) Signed-off-by: Martin Renvoize --- tools/viewlog.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/viewlog.pl b/tools/viewlog.pl index b8979ec776..2f8bc30e3e 100755 --- a/tools/viewlog.pl +++ b/tools/viewlog.pl @@ -74,9 +74,9 @@ if ( $src eq 'circ' ) { use C4::Members::Attributes qw(GetBorrowerAttributes); my $borrowernumber = $object; my $patron = Koha::Patrons->find( $borrowernumber ); + my $circ_info = 1; unless ( $patron ) { - print $input->redirect("/cgi-bin/koha/circ/circulation.pl?borrowernumber=$borrowernumber"); - exit; + $circ_info = 0; } if ( C4::Context->preference('ExtendedPatronAttributes') ) { my $attributes = GetBorrowerAttributes( $borrowernumber ); @@ -88,7 +88,7 @@ if ( $src eq 'circ' ) { $template->param( patron => $patron, - circulation => 1, + circulation => $circ_info, ); } -- 2.39.5