Bugzilla – Attachment 119011 Details for
Bug 25946
borrowerRelationship can no longer be empty
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25946: borrowerRelationship can be empty
Bug-25946-borrowerRelationship-can-be-empty.patch (text/plain), 2.11 KB, created by
Martin Renvoize (ashimema)
on 2021-03-30 14:18:07 UTC
(
hide
)
Description:
Bug 25946: borrowerRelationship can be empty
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-03-30 14:18:07 UTC
Size:
2.11 KB
patch
obsolete
>From 606707481095d42539ee6c1cf0462e3f339b9177 Mon Sep 17 00:00:00 2001 >From: Petro Vashchuk <stalkernoid@gmail.com> >Date: Mon, 29 Mar 2021 16:58:25 +0300 >Subject: [PATCH] Bug 25946: borrowerRelationship can be empty > >Do not split the config using comma. > >From syspref description of borrowerRelationship preference: > >> Guarantors can be the following of those they guarantee: >> (input multiple choices separated by |). Leave empty to deactivate. > >As it doesn't mention comma at all, I removed ',' from split. >Of course if comma is actually a viable way to split separate choices, >I can obsolete this patch and append to the syspref description that it >also can be separated by comma. > >Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha/Patron/Relationship.pm | 2 +- > members/memberentry.pl | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > >diff --git a/Koha/Patron/Relationship.pm b/Koha/Patron/Relationship.pm >index 4bce8c93ca..1058f27cac 100644 >--- a/Koha/Patron/Relationship.pm >+++ b/Koha/Patron/Relationship.pm >@@ -48,7 +48,7 @@ Overloaded method that makes some checks before storing on the DB > sub store { > my ( $self ) = @_; > >- my @valid_relationships = split /,|\|/, C4::Context->preference('borrowerRelationship'); >+ my @valid_relationships = split /\|/, C4::Context->preference('borrowerRelationship'); > > Koha::Exceptions::Patron::Relationship::InvalidRelationship->throw( > no_relationship => 1 ) >diff --git a/members/memberentry.pl b/members/memberentry.pl >index e6be7854a0..462cebd7a1 100755 >--- a/members/memberentry.pl >+++ b/members/memberentry.pl >@@ -107,7 +107,7 @@ my @messages; > ## Deal with guarantor stuff > $template->param( relationships => scalar $patron->guarantor_relationships ) if $patron; > >-my @relations = split /,|\|/, C4::Context->preference('borrowerRelationship'); >+my @relations = split /\|/, C4::Context->preference('borrowerRelationship'); > my $empty_relationship_allowed = grep {$_ eq ""} @relations; > $template->param( empty_relationship_allowed => $empty_relationship_allowed ); > >-- >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 25946
:
107469
|
108048
|
118991
|
118992
|
118993
|
118997
|
118998
|
118999
| 119011 |
119012
|
119013
|
119015