Bugzilla – Attachment 12772 Details for
Bug 6030
Allow for html in letters in overdue notices
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 6030 follow-up
Bug-6030-follow-up.patch (text/plain), 2.23 KB, created by
Paul Poulain
on 2012-10-11 13:13:10 UTC
(
hide
)
Description:
Bug 6030 follow-up
Filename:
MIME Type:
Creator:
Paul Poulain
Created:
2012-10-11 13:13:10 UTC
Size:
2.23 KB
patch
obsolete
>From 710d445e56206ae1cc0c4767f0805f489f3b73cf Mon Sep 17 00:00:00 2001 >From: Paul Poulain <paul.poulain@biblibre.com> >Date: Thu, 11 Oct 2012 14:54:48 +0200 >Subject: [PATCH] Bug 6030 follow-up > >fix SQL error > >The <<'END_SQL' doesn't expand variables. So $date stay as $date, resulting in a nasty error > >DBD::mysql::st execute failed: Unknown column '$date' in 'field list' at misc/cronjobs/overdue_notices.pl line 505. >--- > misc/cronjobs/overdue_notices.pl | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl >index 2b8f368..2a90c10 100755 >--- a/misc/cronjobs/overdue_notices.pl >+++ b/misc/cronjobs/overdue_notices.pl >@@ -404,15 +404,15 @@ foreach my $branchcode (@branches) { > > $verbose and warn sprintf "branchcode : '%s' using %s\n", $branchcode, $admin_email_address; > >- my $sth2 = $dbh->prepare( <<'END_SQL' ); >-SELECT biblio.title as "biblio.title", biblio.*, items.*, issues.*, biblioitems.itemtype, TO_DAYS($date)-TO_DAYS(date_due) AS days_overdue >+ my $sth2 = $dbh->prepare( " >+SELECT biblio.title as 'biblio.title', biblio.*, items.*, issues.*, biblioitems.itemtype, TO_DAYS($date)-TO_DAYS(date_due) AS days_overdue > FROM issues,items,biblio, biblioitems > WHERE items.itemnumber=issues.itemnumber > AND biblio.biblionumber = items.biblionumber > AND biblio.biblionumber = biblioitems.biblionumber > AND issues.borrowernumber = ? > AND TO_DAYS($date)-TO_DAYS(date_due) BETWEEN ? and ? >-END_SQL >+"); > > my $query = "SELECT * FROM overduerules WHERE delay1 IS NOT NULL AND branchcode = ? "; > $query .= " AND categorycode IN (".join( ',' , ('?') x @myborcat ).") " if (@myborcat); >@@ -505,7 +505,7 @@ END_SQL > $sth2->execute(@params); > $verbose and warn "STH2 PARAMS: borrowernumber = $borrowernumber, mindays = $mindays, maxdays = $maxdays returns ".$sth2->rows." rows"; > 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} ); >-- >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 6030
:
3596
|
5240
|
5241
|
6251
|
6252
|
12110
|
12111
|
12112
|
12113
|
12231
|
12232
|
12234
|
12235
|
12397
|
12698
|
12699
|
12700
|
12701
|
12772
|
13017
|
13018
|
14128
|
14129