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 <katrin.fischer.83@web.de>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
This commit is contained in:
Marc Véron 2016-05-05 08:13:53 +02:00 committed by Brendan Gallagher
parent 853d3cfe4d
commit a07db3537d
2 changed files with 5 additions and 4 deletions

View File

@ -23,9 +23,6 @@
<div class="span10">
<div id="discharge" class="maincontainer">
<h1>Discharge</h1>
[% IF not(Koha.Preference("useDischarge")) %]
Discharges have not been enabled. Please contact the library.
[% ELSE %]
[% FOR message IN messages %]
<div class="dialog [% message.type %]">
[% IF message.code == "unable_to_generate_pdf" %]
@ -49,7 +46,6 @@
<p><strong>Warning</strong>: 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.</p>
<a href="/cgi-bin/koha/opac-discharge.pl?op=request">Ask for a discharge</a>
[% END %]
[% END %]
</div> <!-- / #discharge -->
</div> <!-- / .span10 -->
</div> <!-- / .row-fluid -->

View File

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