[Koha-patches] [PATCH] [SIGNED-OFF] Bug 6030 Allow html content in letters
Nicole C. Engard
nengard at bywatersolutions.com
Wed Jul 6 06:21:00 CEST 2011
From: Chris Cormack <chrisc at catalyst.net.nz>
Squashed commit of the following:
commit 8368e5de723ec7607402be341975014c8b7b0ea9
Author: Henri-Damien LAURENT <henridamien.laurent at biblibre.com>
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 <henridamien.laurent at biblibre.com>
Date: Tue Sep 21 12:27:29 2010 +0200
Bug 6030 : Letters can be html in overdu_notices.pl
Signed-off-by: Nicole C. Engard <nengard at bywatersolutions.com>
---
misc/cronjobs/overdue_notices.pl | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl
index bc97ecb..fecee9c 100755
--- a/misc/cronjobs/overdue_notices.pl
+++ b/misc/cronjobs/overdue_notices.pl
@@ -480,7 +480,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 = "<table id='itemscontent$borrowernumber'>";
+ $titles .= "<thead><tr><th>" . join( "</th><th>", @$columns_def_hashref{@item_content_fields} );
+ $titles .= "</th></tr></thead><tbody>";
+ }
my @items = ();
my $i = 0;
@@ -508,9 +513,10 @@ END_SQL
}
}
);
-
- 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 /\</, $letter->{'content'};
--
1.7.2.3
More information about the Koha-patches
mailing list