From 148fb34d4d28f9ad389026ba16805cb29d58b9d5 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: Jonathan Druart --- serials/routing.pl | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/serials/routing.pl b/serials/routing.pl index ad5fe380b6..c14205aaaf 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 = Koha::Patrons->find( $routing->{borrowernumber} )->unblessed; -- 2.39.5