Bugzilla – Attachment 135820 Details for
Bug 11889
Option to keep public or shared lists when deleting patron
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11889: (QA follow-up) Changes for wantarray move in ->search
Bug-11889-QA-follow-up-Changes-for-wantarray-move-.patch (text/plain), 1.92 KB, created by
Marcel de Rooy
on 2022-06-08 14:57:25 UTC
(
hide
)
Description:
Bug 11889: (QA follow-up) Changes for wantarray move in ->search
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2022-06-08 14:57:25 UTC
Size:
1.92 KB
patch
obsolete
>From c504d98fcd37712ae4cebe6d142bfdee60ae1a7b Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Wed, 8 Jun 2022 14:47:05 +0000 >Subject: [PATCH] Bug 11889: (QA follow-up) Changes for wantarray move in > ->search >Content-Type: text/plain; charset=utf-8 > >See bug 29844. >--- > Koha/Patron.pm | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/Koha/Patron.pm b/Koha/Patron.pm >index f88ce98dc3..36e0a2cedc 100644 >--- a/Koha/Patron.pm >+++ b/Koha/Patron.pm >@@ -394,8 +394,8 @@ sub delete { > if ( C4::Context->preference('ListOwnershipUponPatronDeletion') eq 'transfer' ) { > my $userenv = C4::Context->userenv(); > my $usernumber = (ref($userenv) eq 'HASH') ? $userenv->{'number'} : 0; >- my @publiclists = Koha::Virtualshelves->get_public_shelves; >- my @sharedlists = Koha::Virtualshelves->get_shared_shelves({ borrowernumber => $self->borrowernumber }); >+ my @publiclists = Koha::Virtualshelves->get_public_shelves->as_list; >+ my @sharedlists = Koha::Virtualshelves->get_shared_shelves({ borrowernumber => $self->borrowernumber })->as_list; > foreach my $plist ( @publiclists ) { > if ( $plist->owner == $self->borrowernumber ) { > my $unique_name = $plist->shelfname . '_' . $self->borrowernumber; >@@ -412,7 +412,7 @@ sub delete { > > # Delete any remaining lists that this user is an owner of (always private lists, > # only public and shared lists if ListOwnershipUponPatronDeletion = delete) >- $_->delete for Koha::Virtualshelves->search({ owner => $self->borrowernumber }); >+ $_->delete for Koha::Virtualshelves->search({ owner => $self->borrowernumber })->as_list; > > # We cannot have a FK on borrower_modifications.borrowernumber, the table is also used > # for patron selfreg >-- >2.20.1
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 11889
:
25972
|
60224
|
60306
|
60307
|
60308
|
60481
|
61319
|
61320
|
61321
|
61322
|
61451
|
61452
|
61453
|
61454
|
108244
|
108245
|
108246
|
108247
|
135808
|
135809
|
135810
|
135811
|
135812
|
135813
|
135814
|
135815
|
135816
|
135817
|
135818
|
135819
|
135820
|
135821
|
135857
|
135858
|
135859
|
135860
|
135861
|
135862
|
135863
|
135864
|
135865
|
135866
|
135867
|
135868
|
135869
|
135870
|
135871
|
135872
|
135873
|
135874
|
135875
|
135876
|
135891
|
135892
|
135893
|
135894
|
135895
|
135896
|
135897
|
135898
|
135899
|
135900
|
135901