Bug 23467: Exit after output_html - opac-reserve.pl

To avoid double screen

There are several ways to recreate the issue, the easiest is:
  /cgi-bin/koha/opac-reserve.pl?biblionumber=

You should see "ERROR: No record id specified."

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Jonathan Druart 2019-11-06 10:59:26 +01:00 committed by Martin Renvoize
parent 45a89f4709
commit a4f2ad76f9
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 5 additions and 0 deletions

View File

@ -90,6 +90,7 @@ if ( $patron->category->effective_BlockExpiredPatronOpacActions ) {
# cannot reserve, their card has expired and the rules set mean this is not allowed
$template->param( message => 1, expired_patron => 1 );
output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 };
exit;
}
}
@ -116,6 +117,7 @@ if (! $biblionumbers) {
if ((! $biblionumbers) && (! $query->param('place_reserve'))) {
$template->param(message=>1, no_biblionumber=>1);
output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 };
exit;
}
# Pass the numbers to the page so they can be fed back
@ -128,6 +130,7 @@ if (($#biblionumbers < 0) && (! $query->param('place_reserve'))) {
# TODO: New message?
$template->param(message=>1, no_biblionumber=>1);
output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 };
exit;
}
@ -220,6 +223,7 @@ if ( $query->param('place_reserve') ) {
if (($selectionCount == 0) || (($selectionCount % 3) != 0)) {
$template->param(message=>1, bad_data=>1);
output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 };
exit;
}
my $failed_holds = 0;
@ -408,6 +412,7 @@ foreach my $biblioNum (@biblionumbers) {
if (! $biblioData) {
$template->param(message=>1, bad_biblionumber=>$biblioNum);
output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 };
exit;
}
my @not_available_at = ();