From 599c93ef10f46185a76c975e9d7373ef7d42e070 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 (cherry picked from commit 43a297efc9b923ecfe5c703e2be4c99549b48954) Signed-off-by: Fridolin Somers --- serials/routing.pl | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/serials/routing.pl b/serials/routing.pl index 32f42e52ab..2201760011 100755 --- a/serials/routing.pl +++ b/serials/routing.pl @@ -51,6 +51,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); } @@ -84,15 +94,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=GetMember('borrowernumber' => $routing->{borrowernumber}); -- 2.39.5