Bugzilla – Attachment 14549 Details for
Bug 9372
Automatic carriage return in message_queue where content_type is html
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 9372 : replace \n with <br /> for html messages in message_queue [3.8.x]
Bug-9372--replace-n-with-br--for-html-messages-in-.patch (text/plain), 1.38 KB, created by
Kyle M Hall (khall)
on 2013-01-11 19:54:05 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 9372 : replace \n with <br /> for html messages in message_queue [3.8.x]
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2013-01-11 19:54:05 UTC
Size:
1.38 KB
patch
obsolete
>From 224dcb65852dac58d53ccdf44ac6dd89a35f8d93 Mon Sep 17 00:00:00 2001 >From: Admin User Koha <koha@hugo.biblibre.com> >Date: Wed, 9 Jan 2013 12:35:27 +0100 >Subject: [PATCH] Bug 9372 : replace \n with <br /> for html messages in message_queue > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > C4/Letters.pm | 9 +++++++-- > 1 files changed, 7 insertions(+), 2 deletions(-) > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index 6d5e458..a9cab4f 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -684,7 +684,12 @@ sub EnqueueLetter ($) { > } > ); > } >- >+ my $content = $params->{'letter'}->{'content'}; >+ if( $params->{'letter'}->{'content-type'} and ($params->{'letter'}->{'content-type'}=~/html/i )) >+ { >+ $content=~s/\n/<br \/>/g; >+ $content=~s/\r//g; >+ } > my $dbh = C4::Context->dbh(); > my $statement = << 'ENDSQL'; > INSERT INTO message_queue >@@ -697,7 +702,7 @@ ENDSQL > my $result = $sth->execute( > $params->{'borrowernumber'}, # borrowernumber > $params->{'letter'}->{'title'}, # subject >- $params->{'letter'}->{'content'}, # content >+ $content, # content > $params->{'letter'}->{'metadata'} || '', # metadata > $params->{'letter'}->{'code'} || '', # letter_code > $params->{'message_transport_type'}, # message_transport_type >-- >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 9372
:
14487
|
14488
|
14546
|
14547
|
14548
|
14549
|
20062
|
20071
|
21003