Bugzilla – Attachment 102951 Details for
Bug 25137
PatronSelfRegistrationLibraryList results in empty branch list on opac-memberentry.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25137: (bug 23084 follow-up) Fix incorrect grep ternary condition
Bug-25137-bug-23084-follow-up-Fix-incorrect-grep-t.patch (text/plain), 1.66 KB, created by
Katrin Fischer
on 2020-04-14 21:39:48 UTC
(
hide
)
Description:
Bug 25137: (bug 23084 follow-up) Fix incorrect grep ternary condition
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2020-04-14 21:39:48 UTC
Size:
1.66 KB
patch
obsolete
>From 320601110ded14af1f8501a256a50ce4fa4cf4e1 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 14 Apr 2020 12:00:01 +0200 >Subject: [PATCH] Bug 25137: (bug 23084 follow-up) Fix incorrect grep ternary > condition > >The lack of parenthesis makes the condition evaluated wrong. > >Test plan: >- confirm you have a branch with code X >- enter X in PatronSelfRegistrationLibraryList >- go to cgi-bin/koha/opac-memberentry.pl (either as a logged in patron or as a self-reg patron) >- confirm branch dropdown is not empty and contain X >- empty out PatronSelfRegistrationLibraryList >- reload cgi-bin/koha/opac-memberentry.pl and confirm branches show > >Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > opac/opac-memberentry.pl | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/opac/opac-memberentry.pl b/opac/opac-memberentry.pl >index 3f6d8a8735..e954587d81 100755 >--- a/opac/opac-memberentry.pl >+++ b/opac/opac-memberentry.pl >@@ -76,7 +76,11 @@ my $mandatory = GetMandatoryFields($action); > > my @libraries = Koha::Libraries->search; > if ( my @libraries_to_display = split '\|', C4::Context->preference('PatronSelfRegistrationLibraryList') ) { >- @libraries = map { my $b = $_; my $branchcode = $_->branchcode; grep { $_ eq $branchcode } @libraries_to_display ? $b : () } @libraries; >+ @libraries = map { >+ my $b = $_; >+ my $branchcode = $_->branchcode; >+ ( grep { $_ eq $branchcode } @libraries_to_display ) ? $b : () >+ } @libraries; > } > 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 25137
:
102917
|
102921
| 102951