Bugzilla – Attachment 10381 Details for
Bug 6090
empty mails in message_queue are sent
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 6090: Do not enqueue empty messages
SIGNED-OFF-Bug-6090-Do-not-enqueue-empty-messages.patch (text/plain), 1.20 KB, created by
Kyle M Hall
on 2012-06-20 12:51:06 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 6090: Do not enqueue empty messages
Filename:
MIME Type:
Creator:
Kyle M Hall
Created:
2012-06-20 12:51:06 UTC
Size:
1.20 KB
patch
obsolete
>From 71122d9bd409bb24979a4cdaa39eb7ca88c80c01 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Thu, 8 Mar 2012 13:50:47 +0100 >Subject: [PATCH] [SIGNED-OFF] Bug 6090: Do not enqueue empty messages > >This patch avoid enqueuing messages that have an empty body. It can >happen when letter is empty or becomes empty after being processed by >parseletter > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > C4/Letters.pm | 7 +++++++ > 1 files changed, 7 insertions(+), 0 deletions(-) > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index 514b355..4bde166 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -672,6 +672,13 @@ sub EnqueueLetter ($) { > return unless exists $params->{'borrowernumber'}; > return unless exists $params->{'message_transport_type'}; > >+ my $content = $params->{letter}->{content}; >+ $content =~ s/\s+//g if(defined $content); >+ if ( not defined $content or $content eq '' ) { >+ warn "Trying to add an empty message to the message queue" if $debug; >+ return; >+ } >+ > # If we have any attachments we should encode then into the body. > if ( $params->{'attachments'} ) { > $params->{'letter'} = _add_attachments( >-- >1.7.2.5
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 6090
:
3746
|
8085
|
9996
|
10151
|
10377
|
10378
| 10381