[Koha-patches] [PATCH 1/3] bug 3482 : followup overduenotices

Henri-Damien LAURENT henridamien.laurent at biblibre.com
Wed Mar 17 11:53:54 CET 2010


items content was not in html
this match puts the item into a table
---
 misc/cronjobs/overdue_notices.pl |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl
index de0c721..3f31526 100755
--- a/misc/cronjobs/overdue_notices.pl
+++ b/misc/cronjobs/overdue_notices.pl
@@ -472,7 +472,7 @@ END_SQL
                 my @params = ($listall ? ( $borrowernumber , 1 , $MAX ) : ( $borrowernumber, $mindays, $maxdays ));
                 $sth2->execute(@params);
                 my $itemcount = 0;
-                my $titles = "";
+                my $titles = ($htmlfilename?"<table id='itemscontent$borrowernumber'>":"");
                 my @items = ();
                 
                 my $i = 0;
@@ -484,10 +484,15 @@ END_SQL
                     }
                     $i++;
                     my @item_info = map { $_ =~ /^date|date$/ ? format_date( $item_info->{$_} ) : $item_info->{$_} || '' } @item_content_fields;
-                    $titles .= join("\t", @item_info) . "\n";
+                    if ($htmlfilename){
+                        $titles .= "<tr><td>".join("</td><td>", @item_info). "</td></tr>";
+                    } else {
+                        $titles .= join("\t", @item_info) . "\n";
+                    }
                     $itemcount++;
                     push (@items, $item_info->{'biblionumber'});
                 }
+                $titles.="</table>" if ($htmlfilename);
                 $sth2->finish;
                 $letter = parse_letter(
                     {   letter          => $letter,
-- 
1.6.3.3




More information about the Koha-patches mailing list