From 23a4b3163128592a464d910d94942087da7990f9 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 12 Aug 2016 09:15:01 +0200 Subject: [PATCH] Bug 17097: [QA Follow-up] Exit after redirect Adds one exit statement, and some whitespace. Signed-off-by: Marcel de Rooy Verified deleting a patron again. Signed-off-by: Kyle M Hall --- members/deletemem.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/members/deletemem.pl b/members/deletemem.pl index 8da16a4dc1..34403fab37 100755 --- a/members/deletemem.pl +++ b/members/deletemem.pl @@ -107,7 +107,7 @@ if (C4::Context->preference("IndependentBranches")) { my $op = $input->param('op') || 'delete_confirm'; my $dbh = C4::Context->dbh; my $is_guarantor = $dbh->selectrow_array("SELECT COUNT(*) FROM borrowers WHERE guarantorid=?", undef, $member); -if ( $op eq 'delete_confirm' or $countissues > 0 or $flags->{'CHARGES'} or $is_guarantor or $deletelocal == 0){ +if ( $op eq 'delete_confirm' or $countissues > 0 or $flags->{'CHARGES'} or $is_guarantor or $deletelocal == 0) { my $patron_image = Koha::Patron::Images->find($bor->{borrowernumber}); $template->param( picture => 1 ) if $patron_image; @@ -154,7 +154,7 @@ if ( $op eq 'delete_confirm' or $countissues > 0 or $flags->{'CHARGES'} or $is_ ), ); } -}elsif ( $op eq 'delete_confirmed' ) { +} elsif ( $op eq 'delete_confirmed' ) { die "Wrong CSRF token" unless Koha::Token->new->check_csrf({ @@ -167,7 +167,7 @@ if ( $op eq 'delete_confirm' or $countissues > 0 or $flags->{'CHARGES'} or $is_ DelMember($member); # TODO Tell the user everything went ok print $input->redirect("/cgi-bin/koha/members/members-home.pl"); + exit 1; } output_html_with_http_headers $input, $cookie, $template->output; - -- 2.39.5