[freeside-commits] branch master updated. 1443045cf75c0bba05a753d6036327a8092bcfca
Mark Wells
mark at 420.am
Tue May 3 13:51:39 PDT 2016
The branch, master has been updated
via 1443045cf75c0bba05a753d6036327a8092bcfca (commit)
via d84ed22f08e1a0c5fe0efdd6446fd9e330a06838 (commit)
from 7d8aea452e6d4090d6c97acce0b6bde0f1dccac1 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 1443045cf75c0bba05a753d6036327a8092bcfca
Merge: d84ed22 7d8aea4
Author: Mark Wells <mark at freeside.biz>
Date: Tue May 3 13:49:31 2016 -0700
Merge branch 'master' of git.freeside.biz:/home/git/freeside
commit d84ed22f08e1a0c5fe0efdd6446fd9e330a06838
Author: Mark Wells <mark at freeside.biz>
Date: Tue May 3 13:49:22 2016 -0700
fix fallback to invoice recipients, #33316
diff --git a/FS/FS/msg_template/email.pm b/FS/FS/msg_template/email.pm
index d1df5d6..cc5428b 100644
--- a/FS/FS/msg_template/email.pm
+++ b/FS/FS/msg_template/email.pm
@@ -294,19 +294,14 @@ sub prepare {
} elsif ( $cust_main ) {
- if ( $opt{'to_contact_classnum'} ) {
-
- my $classnum = $opt{'to_contact_classnum'};
- my @classes = ref($classnum) ? @$classnum : split(',', $classnum);
- if ( !@classes ) {
- # traditional behavior: send to invoice email destinations (only)
- @classes = ( 'invoice' );
- }
- @to = $cust_main->contact_list_email(@classes);
- # not guaranteed to produce contacts, but then customers aren't
- # guaranteed to have email addresses on file. in that case, env_to
- # will be null and sending this message will fail.
- }
+ my $classnum = $opt{'to_contact_classnum'} || '';
+ my @classes = ref($classnum) ? @$classnum : split(',', $classnum);
+ # traditional behavior: send to all invoice recipients
+ @classes = ('invoice') unless @classes;
+ @to = $cust_main->contact_list_email(@classes);
+ # not guaranteed to produce contacts, but then customers aren't
+ # guaranteed to have email addresses on file. in that case, env_to
+ # will be null and sending this message will fail.
} else {
die 'no To: address or cust_main object specified';
-----------------------------------------------------------------------
Summary of changes:
FS/FS/msg_template/email.pm | 21 ++++++++-------------
1 file changed, 8 insertions(+), 13 deletions(-)
More information about the freeside-commits
mailing list