Bugzilla – Attachment 56186 Details for
Bug 17403
Internal Server Error while deleting patron
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 17403: Internal Server Error while deleting patron
PASSED-QA-Bug-17403-Internal-Server-Error-while-de.patch (text/plain), 2.92 KB, created by
Katrin Fischer
on 2016-10-11 13:40:52 UTC
(
hide
)
Description:
[PASSED QA] Bug 17403: Internal Server Error while deleting patron
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2016-10-11 13:40:52 UTC
Size:
2.92 KB
patch
obsolete
>From f1f83c467d09310e6dcef96c0c3e537314d4b251 Mon Sep 17 00:00:00 2001 >From: Marc <veron@veron.ch> >Date: Wed, 5 Oct 2016 15:43:29 +0200 >Subject: [PATCH] [PASSED QA] Bug 17403: Internal Server Error while deleting > patron > >This patch fixes a Internal Server Error while deleting patrons. > >To reproduce: > >- Go to a patron's detail page >- Toolbar : More : Delete >- Confirm "Are you sure you want to delete..." > >Result: Internal Server Error >Plack error log: >exited nonzero: 1 at /home/marc/koha/members/deletemem.pl >Note: Patron is deleted > >Additional tests: Try to delete yourself, to delete a staff member >without having superlibrarian permission etc. > >To test: > >- Apply patch >- Re-start plack >- Try to reproduce steps above (with other patron) >Expected result: >No Internal Server Error, Redirect to Home > Patrons > >Amended to include all occurences of 'exit 1' > >Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> > >Good catch Marc > >Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> >--- > members/deletemem.pl | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > >diff --git a/members/deletemem.pl b/members/deletemem.pl >index 60de8c0..1f901e5 100755 >--- a/members/deletemem.pl >+++ b/members/deletemem.pl >@@ -55,7 +55,7 @@ my $member = $input->param('member'); > #Do not delete yourself... > if ($borrowernumber == $member ) { > print $input->redirect("/cgi-bin/koha/members/moremember.pl?borrowernumber=$member&error=CANT_DELETE_YOURSELF"); >- exit 1; >+ exit 0; # Exit without error > } > > # Handle deletion from the Norwegian national patron database, if it is enabled >@@ -84,12 +84,12 @@ my $userenv = C4::Context->userenv; > if ($bor->{category_type} eq "S") { > unless(C4::Auth::haspermission($userenv->{'id'},{'staffaccess'=>1})) { > print $input->redirect("/cgi-bin/koha/members/moremember.pl?borrowernumber=$member&error=CANT_DELETE_STAFF"); >- exit 1; >+ exit 0; # Exit without error > } > } else { > unless(C4::Auth::haspermission($userenv->{'id'},{'borrowers'=>1})) { > print $input->redirect("/cgi-bin/koha/members/moremember.pl?borrowernumber=$member&error=CANT_DELETE"); >- exit 1; >+ exit 0; # Exit without error > } > } > >@@ -98,7 +98,7 @@ if (C4::Context->preference("IndependentBranches")) { > if ( !C4::Context->IsSuperLibrarian() && $bor->{'branchcode'}){ > unless ($userenv->{branch} eq $bor->{'branchcode'}){ > print $input->redirect("/cgi-bin/koha/members/moremember.pl?borrowernumber=$member&error=CANT_DELETE_OTHERLIBRARY"); >- exit; >+ exit 0; # Exit without error > } > } > } >@@ -165,7 +165,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; >+ exit 0; # Exit without error > } > > output_html_with_http_headers $input, $cookie, $template->output; >-- >2.7.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 17403
:
56055
|
56057
|
56067
| 56186