Bugzilla – Attachment 122063 Details for
Bug 28581
Patron's queue_notice uses inbound_email_address incorrectly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28581: Use from_email_address in the codebase
Bug-28581-Use-fromemailaddress-in-the-codebase.patch (text/plain), 3.57 KB, created by
Marcel de Rooy
on 2021-06-17 12:12:06 UTC
(
hide
)
Description:
Bug 28581: Use from_email_address in the codebase
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2021-06-17 12:12:06 UTC
Size:
3.57 KB
patch
obsolete
>From ca1fdce08f1eea065ba262801f3214e646759261 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 17 Jun 2021 09:59:18 +0000 >Subject: [PATCH] Bug 28581: Use from_email_address in the codebase >Content-Type: text/plain; charset=utf-8 > >Adding only a few trivial cases now. > >Test plan: >Run password recovery or membership expiry cron. >Check sender address. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > Koha/Patron/Password/Recovery.pm | 2 +- > misc/cronjobs/automatic_renewals.pl | 6 ++---- > misc/cronjobs/membership_expiry.pl | 3 +-- > 3 files changed, 4 insertions(+), 7 deletions(-) > >diff --git a/Koha/Patron/Password/Recovery.pm b/Koha/Patron/Password/Recovery.pm >index c2e2d27930..0dafdae4f3 100644 >--- a/Koha/Patron/Password/Recovery.pm >+++ b/Koha/Patron/Password/Recovery.pm >@@ -151,7 +151,7 @@ sub SendPasswordRecoveryEmail { > > # define from emails > my $library = $borrower->library; >- my $kohaEmail = $library->branchemail || C4::Context->preference('KohaAdminEmailAddress'); # send from patron's branch or Koha Admin >+ my $kohaEmail = $library->from_email_address; # send from patron's branch or Koha Admin > > my $message_id = C4::Letters::EnqueueLetter( > { >diff --git a/misc/cronjobs/automatic_renewals.pl b/misc/cronjobs/automatic_renewals.pl >index c8958cdc9d..7b4158b969 100755 >--- a/misc/cronjobs/automatic_renewals.pl >+++ b/misc/cronjobs/automatic_renewals.pl >@@ -212,7 +212,7 @@ if ( $send_notices && $confirm ) { > ); > > my $library = Koha::Libraries->find( $patron->branchcode ); >- my $admin_email_address = $library->branchemail || C4::Context->preference('KohaAdminEmailAddress'); >+ my $admin_email_address = $library->from_email_address; > > C4::Letters::EnqueueLetter( > { letter => $letter, >@@ -270,8 +270,6 @@ String that denote the letter code. > sub send_digests { > my $params = shift; > >- my $admin_email_address = C4::Context->preference('KohaAdminEmailAddress'); >- > PATRON: while ( my ( $borrowernumber, $digest ) = each %{$params->{digests}} ) { > my $borrower_preferences = > C4::Members::Messaging::GetMessagingPreferences( >@@ -285,7 +283,7 @@ sub send_digests { > > my $patron = Koha::Patrons->find( $borrowernumber ); > my $library = Koha::Libraries->find( $params->{branchcode} ); >- my $from_address = $library->{branchemail} || $admin_email_address; >+ my $from_address = $library->from_email_address; > > foreach my $transport ( keys %{ $borrower_preferences->{'transports'} } ) { > my $letter = C4::Letters::GetPreparedLetter ( >diff --git a/misc/cronjobs/membership_expiry.pl b/misc/cronjobs/membership_expiry.pl >index 5038ce1f9f..c140820ea5 100755 >--- a/misc/cronjobs/membership_expiry.pl >+++ b/misc/cronjobs/membership_expiry.pl >@@ -168,7 +168,6 @@ if( !$expdays ) { > exit; > } > >-my $admin_adress = C4::Context->preference('KohaAdminEmailAddress'); > warn 'getting upcoming membership expires' if $verbose; > my $upcoming_mem_expires = Koha::Patrons->search_upcoming_membership_expires( > { >@@ -183,7 +182,7 @@ warn 'found ' . $upcoming_mem_expires->count . ' soon expiring members' > # main loop > $letter_type = 'MEMBERSHIP_EXPIRY' if !$letter_type; > while ( my $recent = $upcoming_mem_expires->next ) { >- my $from_address = $recent->library->branchemail || $admin_adress; >+ my $from_address = $recent->library->from_email_address; > my $letter = C4::Letters::GetPreparedLetter( > module => 'members', > letter_code => $letter_type, >-- >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 28581
:
122056
|
122057
|
122061
|
122062
|
122063
|
122067
|
122068
|
122071
|
122072
|
122073
|
122074
|
122075
|
122076
|
122078
|
122080
|
122081
|
122136
|
122137
|
122138
|
122139
|
122140
|
122212