From 6c26fc4dd35bd3842c7104c195995afab99573d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20V=C3=A9ron?= Date: Thu, 5 May 2016 08:13:53 +0200 Subject: [PATCH] [PASSED QA] Bug 15823: Redirect opac-discharge.pl to 404 page See comment #17: Redirect to 404 in opac-discharge.pl and remove message in template because with the redirect it will never be reached. Signed-off-by: Katrin Fischer --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-discharge.tt | 4 ---- opac/opac-discharge.pl | 5 +++++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-discharge.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-discharge.tt index 23f088d..d8f5648 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-discharge.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-discharge.tt @@ -23,9 +23,6 @@

Discharge

- [% IF not(Koha.Preference("useDischarge")) %] - Discharges have not been enabled. Please contact the library. - [% ELSE %] [% FOR message IN messages %]
[% IF message.code == "unable_to_generate_pdf" %] @@ -49,7 +46,6 @@

Warning: This request is only valid if you are in good standing with the library. Once the application is made, you can not borrow library materials.

Ask for a discharge [% END %] - [% END %]
diff --git a/opac/opac-discharge.pl b/opac/opac-discharge.pl index c9dea91..605efb7 100755 --- a/opac/opac-discharge.pl +++ b/opac/opac-discharge.pl @@ -33,6 +33,11 @@ use Koha::DateUtils; my $input = new CGI; +unless ( C4::Context->preference('useDischarge') ) { + print $input->redirect("/cgi-bin/koha/errors/404.pl"); + exit; +} + my $op = $input->param("op"); # Getting the template and auth -- 1.9.1