From e0a3905d794dd5145b177087e1d694f3da49624c Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Fri, 1 Apr 2011 11:20:58 +1300 Subject: [PATCH] Bug 6030 Allow html content in letters Content-Type: text/plain; charset="utf-8" Squashed commit of the following: commit 8368e5de723ec7607402be341975014c8b7b0ea9 Author: Henri-Damien LAURENT Date: Tue Sep 21 14:41:07 2010 +0200 Bug 6030 : overdue_notices :Removing warning Two extra warnings were issued when using html commit 5984fc92772af68c51f7f5b5450fd5b27d5b6d37 Author: Henri-Damien LAURENT Date: Tue Sep 21 12:27:29 2010 +0200 Bug 6030 : Letters can be html in overdu_notices.pl Signed-off-by: Sophie Meynieux Signed-off-by: Kyle M Hall --- misc/cronjobs/overdue_notices.pl | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl index e83bd39..c386916 100755 --- a/misc/cronjobs/overdue_notices.pl +++ b/misc/cronjobs/overdue_notices.pl @@ -489,7 +489,12 @@ END_SQL $verbose and warn "STH2 PARAMS: borrowernumber = $borrowernumber, mindays = $mindays, maxdays = $maxdays"; $sth2->execute(@params); my $itemcount = 0; - my $titles = ""; + my $titles; + if ($htmlfilename) { + $titles = ""; + $titles .= ""; + } my @items = (); my $j = 0; @@ -528,8 +533,10 @@ END_SQL next PERIOD; } - if ( $exceededPrintNoticesMaxLines ) { - $letter->{'content'} .= "List too long for form; please check your account online for a complete list of your overdue items."; + $letter->{'content-type'}="text/".($htmlfilename?"html":"plain"); + + if ($exceededPrintNoticesMaxLines) { + $letter->{'content'} .= "List too long for form; please check your account online for a complete list of your overdue items."; } my @misses = grep { /./ } map { /^([^>]*)[>]+/; ( $1 || '' ); } split /\{'content'}; -- 1.7.2.5
" . join( "", @$columns_def_hashref{@item_content_fields} ); + $titles .= "