[freeside-commits] branch FREESIDE_3_BRANCH updated. 2d7cf9d3a071bc96cb1b186cecec167c9e3482a5

Mark Wells mark at 420.am
Thu Apr 16 21:55:01 PDT 2015


The branch, FREESIDE_3_BRANCH has been updated
       via  2d7cf9d3a071bc96cb1b186cecec167c9e3482a5 (commit)
      from  c9666df6c2717f98a5088b39f1babc55c4d8e771 (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 2d7cf9d3a071bc96cb1b186cecec167c9e3482a5
Author: Mark Wells <mark at freeside.biz>
Date:   Thu Apr 16 21:54:35 2015 -0700

    don't try to produce plain text quotations without a template, #34460, from #31786

diff --git a/FS/FS/Template_Mixin.pm b/FS/FS/Template_Mixin.pm
index 563cbdd..44d44e1 100644
--- a/FS/FS/Template_Mixin.pm
+++ b/FS/FS/Template_Mixin.pm
@@ -2094,11 +2094,20 @@ sub generate_email {
 
   if (!@text) {
 
-    warn "$me generating plain text invoice"
-      if $DEBUG;
+    if ( $conf->config($tc.'template') ) {
+
+      warn "$me generating plain text invoice"
+        if $DEBUG;
 
-    # 'print_text' argument is no longer used
-    @text = $self->print_text(\%args);
+      # 'print_text' argument is no longer used
+      @text = $self->print_text(\%args);
+
+    } else {
+
+      warn "$me no plain text version exists; sending empty message body"
+        if $DEBUG;
+
+    }
 
   }
 

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/Template_Mixin.pm |   17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)




More information about the freeside-commits mailing list