Bugzilla – Attachment 24321 Details for
Bug 8168
ersatz CSV header in attachment of overdue notices sent to administrator
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug:8168 Fixing header of non csv files
Bug8168-Fixing-header-of-non-csv-files.patch (text/plain), 1.47 KB, created by
Daniel Barker
on 2014-01-14 22:37:51 UTC
(
hide
)
Description:
Bug:8168 Fixing header of non csv files
Filename:
MIME Type:
Creator:
Daniel Barker
Created:
2014-01-14 22:37:51 UTC
Size:
1.47 KB
patch
obsolete
>From c4e24513aca455d40dcc015d49b3ba18e8d91375 Mon Sep 17 00:00:00 2001 >From: Daniel Barker <daniel.barker.nz@gmail.com> >Date: Wed, 15 Jan 2014 09:57:19 +1300 >Subject: [PATCH] Bug:8168 Fixing header of non csv files > >1. make some overdues books >2. run the overdue notices script without the -csv >3. check emails notice csv header is in the email >4. apply the patch >5. run the overdue notice again >6. check email notice csv header is absent >--- > misc/cronjobs/overdue_notices.pl | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) > >diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl >index 7745047..73f70b6 100755 >--- a/misc/cronjobs/overdue_notices.pl >+++ b/misc/cronjobs/overdue_notices.pl >@@ -627,8 +627,15 @@ END_SQL > print @output_chunks; > } > # Generate the content of the csv with headers >- my $content = join(";", qw(title name surname address1 address2 zipcode city country email itemcount itemsinfo due_date issue_date)) . "\n"; >- $content .= join( "\n", @output_chunks ); >+ my $content; >+ if ( defined $csvfilename ) { >+ $content = join(";", qw(title name surname address1 address2 zipcode city country email itemcount itemsinfo due_date issue_date)) . "\n"; >+ } >+ else { >+ $content = ""; >+ } >+ $content .= join( "\n", @output_chunks ); >+ > > my $attachment = { > filename => defined $csvfilename ? 'attachment.csv' : 'attachment.txt', >-- >1.7.9.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 8168
:
24321
|
24656
|
24665
|
24675
|
24680
|
24681
|
25874
|
25875
|
26413
|
26414