From 43a297efc9b923ecfe5c703e2be4c99549b48954 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 8 May 2018 14:27:38 -0300 Subject: [PATCH] Bug 20730: Move the authentication block before doing anything No need to add more information here, it's self-explanatory... Signed-off-by: Mark Tompsett Signed-off-by: Tomas Cohen Arazi Signed-off-by: Nick Clemens --- serials/routing.pl | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/serials/routing.pl b/serials/routing.pl index af23b6cffd..5c27def2ba 100755 --- a/serials/routing.pl +++ b/serials/routing.pl @@ -52,6 +52,16 @@ my $date_selected = $query->param('date_selected'); $date_selected ||= q{}; my $dbh = C4::Context->dbh; +my ( $template, $loggedinuser, $cookie ) = get_template_and_user( + { + template_name => 'serials/routing.tt', + query => $query, + type => 'intranet', + authnotrequired => 0, + flagsrequired => { serials => 'routing' }, + } +); + if($op eq 'delete'){ delroutingmember($routingid,$subscriptionid); } @@ -85,15 +95,6 @@ foreach my $dateseq (@{$serialdates}) { push @{$dates}, $d; } -my ($template, $loggedinuser, $cookie) -= get_template_and_user({template_name => 'serials/routing.tt', - query => $query, - type => 'intranet', - authnotrequired => 0, - flagsrequired => {serials => 'routing'}, - debug => 1, - }); - my $member_loop = []; for my $routing ( @routinglist ) { my $member = Koha::Patrons->find( $routing->{borrowernumber} )->unblessed; -- 2.39.5