From 2d971d15b57579c2185397b565cdc33eecdd1020 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 23 Oct 2017 15:33:17 -0300 Subject: [PATCH] Bug 7317: (QA folowup) 404 if module is disabled (intranet) Signed-off-by: Tomas Cohen Arazi Signed-off-by: Magnus Enger Signed-off-by: Tomas Cohen Arazi Signed-off-by: Benjamin Rokseth Signed-off-by: Jonathan Druart --- ill/ill-requests.pl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ill/ill-requests.pl b/ill/ill-requests.pl index 26cb350a67..f6572e494d 100755 --- a/ill/ill-requests.pl +++ b/ill/ill-requests.pl @@ -27,7 +27,7 @@ use Koha::AuthorisedValues; use Koha::Illrequests; use Koha::Libraries; -my $cgi = CGI->new; +our $cgi = CGI->new; my $illRequests = Koha::Illrequests->new; # Grab all passed data @@ -35,6 +35,12 @@ my $illRequests = Koha::Illrequests->new; # of 'my' our $params = $cgi->Vars(); +# Leave immediately if ILLModule is disabled +unless ( C4::Context->preference('ILLModule') ) { + print $cgi->redirect("/cgi-bin/koha/errors/404.pl"); + exit; +} + my $op = $params->{method} || 'illlist'; my ( $template, $patronnumber, $cookie ) = get_template_and_user( { -- 2.39.5