Bugzilla – Attachment 70355 Details for
Bug 19935
Move C4::Members::GetPendingIssues to the Koha namespace
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19935: Replace GetPendingIssues - deletemem.pl
Bug-19935-Replace-GetPendingIssues---deletemempl.patch (text/plain), 1.46 KB, created by
Jonathan Druart
on 2018-01-09 14:31:29 UTC
(
hide
)
Description:
Bug 19935: Replace GetPendingIssues - deletemem.pl
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-01-09 14:31:29 UTC
Size:
1.46 KB
patch
obsolete
>From a041d6644584d5cb812db25d8421d37956cd6ee3 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 8 Jan 2018 11:16:09 -0300 >Subject: [PATCH] Bug 19935: Replace GetPendingIssues - deletemem.pl > >Same as previously, we just want Koha::Patron->checkouts->count to know >if a patron has checkouts. > >Test plan: >Confirm that you cannot delete a patron's card if they have pending checkouts >--- > members/deletemem.pl | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) > >diff --git a/members/deletemem.pl b/members/deletemem.pl >index 4287c2917f..39abd2a785 100755 >--- a/members/deletemem.pl >+++ b/members/deletemem.pl >@@ -71,19 +71,15 @@ if ( C4::Context->preference('NorwegianPatronDBEnable') && C4::Context->preferen > } > } > >-my $issues = GetPendingIssues($member); # FIXME: wasteful call when really, we only want the count >-my $countissues = scalar(@$issues); >- > my $patron = Koha::Patrons->find( $member ); > unless ( $patron ) { > print $input->redirect("/cgi-bin/koha/circ/circulation.pl?borrowernumber=$member"); > exit; > } >+my $countissues = $patron->pending_checkouts->count; > my $charges = $patron->account->non_issues_charges; > my $userenv = C4::Context->userenv; > >- >- > if ($patron->category->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"); >-- >2.11.0
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 19935
:
70351
|
70352
|
70353
|
70354
|
70355
|
70356
|
70357
|
70358
|
70359
|
70360
|
70361
|
71807
|
71808
|
71809
|
71810
|
71811
|
71812
|
71813
|
72752
|
72753
|
72754
|
72755
|
72756
|
72757
|
72758
|
72759
|
72760
|
72761
|
72762
|
73557
|
73558
|
73559
|
73560
|
73561
|
73562
|
73563
|
73564
|
73565
|
73566
|
73567
|
73568
|
73569
|
73570
|
73571
|
73572
|
73573
|
73574
|
73575
|
73576
|
73577
|
73578
|
73579
|
73580
|
73581
|
73582