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:
parent
853d3cfe4d
commit
a07db3537d
|
|
@ -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 -->
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue