From e711e0b19e4bef58f63a1771b6743ef88154506b Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Thu, 14 Aug 2014 15:15:48 +0200 Subject: [PATCH] Bug 12760 - add restrictions purge to cleanup_database.pl (followup 1) Remove unused $query var Correct redefined $count var Signed-off-by: Chris Cormack --- misc/cronjobs/cleanup_database.pl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/misc/cronjobs/cleanup_database.pl b/misc/cronjobs/cleanup_database.pl index 49c0157..41038d0 100755 --- a/misc/cronjobs/cleanup_database.pl +++ b/misc/cronjobs/cleanup_database.pl @@ -128,7 +128,6 @@ unless ( $sessions } my $dbh = C4::Context->dbh(); -my $query; my $sth; my $sth2; my $count; @@ -181,7 +180,7 @@ if ($mail) { $sth = $dbh->prepare("DELETE FROM message_queue WHERE time_queued < date_sub(curdate(), interval ? day)"); $sth->execute($mail) or die $dbh->errstr; - my $count = $sth->rows; + $count = $sth->rows; $sth->finish; print "$count messages were deleted from the mail queue.\nDone with message_queue purge.\n" if ($verbose); -- 1.9.1