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>
use Koha::Illrequests;
use Koha::Libraries;
-my $cgi = CGI->new;
+our $cgi = CGI->new;
my $illRequests = Koha::Illrequests->new;
# Grab all passed data
# 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( {