Bugzilla – Attachment 85135 Details for
Bug 12532
Copy guarantee email to guarantor (or redirect if guarantee has no email set)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12532 - (follow up) clean up
Bug-12532---follow-up-clean-up.patch (text/plain), 2.48 KB, created by
Mikaël Olangcay Brisebois
on 2019-02-14 17:32:35 UTC
(
hide
)
Description:
Bug 12532 - (follow up) clean up
Filename:
MIME Type:
Creator:
Mikaël Olangcay Brisebois
Created:
2019-02-14 17:32:35 UTC
Size:
2.48 KB
patch
obsolete
>From 4f017ec295b2de837cd4df873568abd563642526 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Mika=C3=ABl=20Olangcay=20Brisebois?= > <mikael.olangcay-brisebois@inLibro.com> >Date: Thu, 14 Feb 2019 12:30:18 -0500 >Subject: [PATCH] Bug 12532 - (follow up) clean up > >--- > Koha/Patron.pm | 52 ++++++++++++++++++++++++++++---------------------- > 1 file changed, 29 insertions(+), 23 deletions(-) > >diff --git a/Koha/Patron.pm b/Koha/Patron.pm >index 20f35e96f9..afbe2710e0 100644 >--- a/Koha/Patron.pm >+++ b/Koha/Patron.pm >@@ -1002,31 +1002,37 @@ Returns the empty string if no email address. > =cut > > sub notice_email_address{ >- my ( $self ) = @_; >- my $address; >- >- my $which_address = C4::Context->preference("AutoEmailPrimaryAddress"); >- # if syspref is set to 'first valid' (value == OFF), look up email address >- if ( $which_address eq 'OFF' ) { >- $address = $self->first_valid_email_address; >- } else { >- $address = $self->$which_address || ''; >- } >- >- my $use_guarantor = C4::Context->preference('RedirectGuaranteeEmail'); >- if ($use_guarantor) { >- my $guarantor = $self->guarantor; >- if ($guarantor) { >- my $guarantor_address = $guarantor->notice_email_address; >- if ($address){ >- $address .= ', '; >- } >- $address .= $guarantor_address if $guarantor_address; >- } >- } >- return $address; >+ my ( $self ) = @_; >+ my $address; >+ my $guarantor_address; >+ >+ my $which_address = C4::Context->preference("AutoEmailPrimaryAddress"); >+ # if syspref is set to 'first valid' (value == OFF), look up email address >+ if ( $which_address eq 'OFF' ) { >+ $address = $self->first_valid_email_address; >+ } else { >+ $address = $self->$which_address || ''; >+ } >+ >+ my $use_guarantor = C4::Context->preference('RedirectGuaranteeEmail'); >+ if ($use_guarantor) { >+ my $guarantor = $self->guarantor; >+ if ($guarantor) { >+ if ( $which_address eq 'OFF' ) { >+ $guarantor_address = $guarantor->first_valid_email_address; >+ } else { >+ $guarantor_address = $guarantor->$which_address || ''; >+ } >+ if ($address){ >+ $address .= ', '; >+ } >+ $address .= $guarantor_address if $guarantor_address; >+ } >+ } >+ return $address; > } > >+ > =head3 first_valid_email_address > > my $first_valid_email_address = $patron->first_valid_email_address >-- >2.17.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 12532
:
29510
|
30747
|
35313
|
36752
|
39787
|
39925
|
48645
|
53649
|
53689
|
53690
|
53699
|
53700
|
55985
|
56052
|
56053
|
59445
|
59446
|
59447
|
63197
|
64802
|
64824
|
67115
|
68340
|
70865
|
72064
|
72617
|
75099
|
77606
|
80313
|
85134
|
85135
|
87815
|
87816
|
88208
|
88209
|
88210
|
88211
|
88212
|
88213
|
88295
|
88296
|
114455
|
114456
|
114457
|
114458
|
114459
|
114460
|
114461
|
131091
|
131092
|
131093
|
131094
|
149233
|
150071
|
150208
|
150217
|
150240
|
150256
|
151028
|
151029
|
154854
|
154855
|
154856
|
154857
|
155036
|
155037
|
155828
|
155829
|
155830
|
155831
|
155832
|
155833
|
155834
|
155835
|
155836
|
155837
|
155873
|
155874
|
155875
|
155876
|
155877
|
155878
|
155879
|
155880
|
155881
|
155882
|
155883
|
155886
|
155934
|
155935
|
155936
|
155937
|
155938
|
155939
|
155940
|
155941
|
155942
|
155943
|
155944
|
155945
|
155946