Bugzilla – Attachment 20830 Details for
Bug 10727
Replace carriage return with <br /> when writing hold notices
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10727 : Replace carriage return with <br /> when printing hold notices
Bug-10727--Replace-carriage-return-with-br--when-p.patch (text/plain), 1.73 KB, created by
Kyle M Hall (khall)
on 2013-09-06 16:16:19 UTC
(
hide
)
Description:
Bug 10727 : Replace carriage return with <br /> when printing hold notices
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2013-09-06 16:16:19 UTC
Size:
1.73 KB
patch
obsolete
>From 07c7ba11aa7bf92de5e86086ecf2746ccfd35d20 Mon Sep 17 00:00:00 2001 >From: Sophie Meynieux <sophie.meynieux@biblibre.com> >Date: Wed, 14 Aug 2013 15:51:10 +0200 >Subject: [PATCH] Bug 10727 : Replace carriage return with <br /> when printing hold notices > > This patch replaces carriage return with <br /> in the content of > hold notices for printing. This is necessary to convert html file > into well formatted pdf file. > >Test plan : > - checkin an item reserved by a borrower > that has not activated email notification > - verify in message_queue table that you've got a > new HOLD_PRINT notice with status 'pending' > - run gather_print_notices.pl <directory> > >Without the patch, the script generates a html file without <br /> tags. >If you run printoverdues.sh <directory>, the text in the resulting pdf file >is all on one line > >With the patch, the script generates a html file with <br/> tags and >pdf file created by printoverdues.sh is well formatted. > >Signed-off-by: Srdjan <srdjan@catalyst.net.nz> >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > misc/cronjobs/gather_print_notices.pl | 8 ++++++++ > 1 files changed, 8 insertions(+), 0 deletions(-) > >diff --git a/misc/cronjobs/gather_print_notices.pl b/misc/cronjobs/gather_print_notices.pl >index 286b035..2d05557 100755 >--- a/misc/cronjobs/gather_print_notices.pl >+++ b/misc/cronjobs/gather_print_notices.pl >@@ -69,6 +69,14 @@ my $today = C4::Dates->new(); > my @all_messages = @{ GetPrintMessages() }; > exit unless (@all_messages); > >+## carriage return replaced by <br/> as output is html >+foreach my $message (@all_messages) { >+ local $_ = $message->{'content'}; >+ s/\n/<br \/>/g; >+ s/\r//g; >+ $message->{'content'} = $_; >+} >+ > my $OUTPUT; > > if ($split) { >-- >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 10727
:
20330
|
20755
|
20830
|
28502