Bugzilla – Attachment 147711 Details for
Bug 32426
Make userid generation pluggable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32426: (follow-up) Use more acurate term 'internal' instead of 'legacy'
Bug-32426-follow-up-Use-more-acurate-term-internal.patch (text/plain), 2.44 KB, created by
Kyle M Hall (khall)
on 2023-03-03 16:08:53 UTC
(
hide
)
Description:
Bug 32426: (follow-up) Use more acurate term 'internal' instead of 'legacy'
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2023-03-03 16:08:53 UTC
Size:
2.44 KB
patch
obsolete
>From 396928c3846ed08d48dfca70e4e9378a3de7daa6 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 3 Mar 2023 16:03:05 +0000 >Subject: [PATCH] Bug 32426: (follow-up) Use more acurate term 'internal' > instead of 'legacy' > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > Koha/Patron.pm | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > >diff --git a/Koha/Patron.pm b/Koha/Patron.pm >index c5185e32a8..09b2e01bf6 100644 >--- a/Koha/Patron.pm >+++ b/Koha/Patron.pm >@@ -1818,14 +1818,14 @@ sub has_valid_userid { > $patron->generate_userid; > > If you do not have a plugin for generating a userid, we will call >- the legacy method here that returns firstname.surname[.number], >+ the internal method here that returns firstname.surname[.number], > where number is an optional suffix to make the userid unique. > (Its behavior has not been changed on bug 32426.) > > If you have plugin(s), the first valid response will be used. > A plugin is assumed to return a valid userid as suggestion, but not > assumed to save it already. >- Does not fallback to legacy (you could arrange for that in your plugin). >+ Does not fallback to internal (you could arrange for that in your plugin). > Clears userid when there are no valid plugin responses. > > =cut >@@ -1837,12 +1837,12 @@ sub generate_userid { > ); > unless( @responses ) { > # Empty list only possible when there are NO enabled plugins for this method. >- # In that case we provide legacy response. >- return $self->_generate_userid_legacy; >+ # In that case we provide internal response. >+ return $self->_generate_userid_internal; > } > # If a plugin returned false value or invalid value, we do however not return >- # legacy response. The plugins should deal with that themselves. So we prevent >- # unexpected/unwelcome legacy codes for plugin failures. >+ # internal response. The plugins should deal with that themselves. So we prevent >+ # unexpected/unwelcome internal codes for plugin failures. > foreach my $response ( grep { $_ } @responses ) { > $self->userid( $response ); > return $self if $self->has_valid_userid; >@@ -1851,7 +1851,7 @@ sub generate_userid { > return $self; > } > >-sub _generate_userid_legacy { # as we always did >+sub _generate_userid_internal { # as we always did > my ($self) = @_; > my $offset = 0; > my $firstname = $self->firstname // q{}; >-- >2.30.2
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 32426
:
146947
|
146948
|
146949
|
146950
|
146951
|
146952
|
146953
|
146954
|
147252
|
147253
|
147254
|
147255
|
147704
|
147705
|
147706
|
147707
|
147708
|
147709
|
147710
|
147711
|
147712
|
148203
|
148204
|
148205
|
148206
|
148207
|
148208
|
148209
|
148210
|
148211
|
148782
|
148793