From 863110c86cdad57fc5aa373dbf727097119a10ad 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 --- tools/viewlog.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/viewlog.pl b/tools/viewlog.pl index e9e9f42..7c4384a 100755 --- a/tools/viewlog.pl +++ b/tools/viewlog.pl @@ -73,9 +73,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 ); @@ -87,7 +87,7 @@ if ( $src eq 'circ' ) { $template->param( patron => $patron, - circulation => 1, + circulation => $circ_info, ); } -- 2.1.4