From ee0a778eaab7487b19abe7399aa6a92bd7ba3ac4 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 9 Aug 2012 15:40:53 +0200 Subject: [PATCH] Bug 8607: FIX overdues_notices script: $date is not replaced The script is unusable. The variable $date is not replaced with its content. Signed-off-by: wajasu Signed-off-by: Paul Poulain --- misc/cronjobs/overdue_notices.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl index 8c0bc12d30..1243add850 100755 --- a/misc/cronjobs/overdue_notices.pl +++ b/misc/cronjobs/overdue_notices.pl @@ -388,7 +388,7 @@ foreach my $branchcode (@branches) { $verbose and warn sprintf "branchcode : '%s' using %s\n", $branchcode, $admin_email_address; - my $sth2 = $dbh->prepare( <<'END_SQL' ); + my $sth2 = $dbh->prepare( <<"END_SQL" ); SELECT 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 @@ -455,10 +455,10 @@ END_SQL } $borrower_sql .= ' AND categories.overduenoticerequired=1 '; if($triggered) { - $borrower_sql .= ' AND TO_DAYS($date)-TO_DAYS(date_due) = ?'; + $borrower_sql .= " AND TO_DAYS($date)-TO_DAYS(date_due) = ?"; push @borrower_parameters, $mindays; } else { - $borrower_sql .= ' AND TO_DAYS($date)-TO_DAYS(date_due) BETWEEN ? and ? ' ; + $borrower_sql .= " AND TO_DAYS($date)-TO_DAYS(date_due) BETWEEN ? and ? " ; push @borrower_parameters, $mindays, $maxdays; } -- 2.39.5