Bug 7317: (QA folowup) 404 if module is disabled (intranet)

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Tomas Cohen Arazi 2017-10-23 15:33:17 -03:00 committed by Jonathan Druart
parent 8e86b5e093
commit 2d971d15b5
1 changed files with 7 additions and 1 deletions

View File

@ -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( {