Bugzilla – Attachment 116425 Details for
Bug 27604
PatronSelfRegistrationLibraryList can be bypassed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27604: (QA follow-up) Limit the libraries during the query
Bug-27604-QA-follow-up-Limit-the-libraries-during-.patch (text/plain), 1.38 KB, created by
Nick Clemens (kidclamp)
on 2021-02-05 17:32:08 UTC
(
hide
)
Description:
Bug 27604: (QA follow-up) Limit the libraries during the query
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2021-02-05 17:32:08 UTC
Size:
1.38 KB
patch
obsolete
>From ba81b3d28ab3c658ef46940c7d860b786355285b Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 5 Feb 2021 17:29:54 +0000 >Subject: [PATCH] Bug 27604: (QA follow-up) Limit the libraries during the > query > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> > >https://bugs.koha-community.org/show_bug.cgi?id=11983 >--- > opac/opac-memberentry.pl | 12 +++--------- > 1 file changed, 3 insertions(+), 9 deletions(-) > >diff --git a/opac/opac-memberentry.pl b/opac/opac-memberentry.pl >index c51a18eafa..5c9fe6120b 100755 >--- a/opac/opac-memberentry.pl >+++ b/opac/opac-memberentry.pl >@@ -75,18 +75,12 @@ if ( $action eq q{} ) { > > my $mandatory = GetMandatoryFields($action); > >-my @libraries = Koha::Libraries->search; >+my $params = undef; > if ( $action eq 'create' || $action eq 'new' ) { > my @PatronSelfRegistrationLibraryList = split '\|', C4::Context->preference('PatronSelfRegistrationLibraryList'); >- if (@PatronSelfRegistrationLibraryList) { >- @libraries = map { >- my $l = $_; >- ( grep { $l->branchcode eq $_ } @PatronSelfRegistrationLibraryList ) >- ? $l >- : () >- } @libraries; >- } >+ $params = { branchcode => { -in => \@PatronSelfRegistrationLibraryList } }; > } >+my @libraries = Koha::Libraries->search($params); > > my ( $min, $max ) = C4::Members::get_cardnumber_length(); > if ( defined $min ) { >-- >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 27604
:
116271
|
116286
|
116424
| 116425 |
116497
|
116907
|
117020