From c2c3ee37a6af44664a8341bf801b0ec3b7e34be9 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Mon, 19 Oct 2015 14:26:16 -0400 Subject: [PATCH] Bug 13409 [QA Followup] - Remove MySQLism --- misc/cronjobs/cleanup_database.pl | 15 ++++++++++----- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/misc/cronjobs/cleanup_database.pl b/misc/cronjobs/cleanup_database.pl index 423b0ac..cb56d5a 100755 --- a/misc/cronjobs/cleanup_database.pl +++ b/misc/cronjobs/cleanup_database.pl @@ -35,11 +35,13 @@ BEGIN { eval { require "$FindBin::Bin/../kohalib.pl" }; } +use Getopt::Long; + use C4::Context; use C4::Dates; use C4::Search; -use Getopt::Long; use C4::Log; +use Koha::DateUtils; sub usage { print STDERR <subtract( days => $pHolidays ); + $sth = $dbh->prepare( q{ DELETE FROM special_holidays - WHERE DATE( CONCAT( year, '-', month, '-', day ) ) < DATE_SUB( CURDATE(), INTERVAL ? DAY ) + WHERE DATE( CONCAT( year, '-', month, '-', day ) ) < ? } ); - $sth->execute( $pHolidays ) or die $dbh->errstr; + $sth->execute( $date->ymd ) or die $dbh->errstr; } -- 1.7.2.5