@@ -, +, @@ --- ill/ill-requests.pl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) --- a/ill/ill-requests.pl +++ a/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( { --