From 4acc764ffd2afe5994127c6d8eadee017a0382bc Mon Sep 17 00:00:00 2001
From: Fridolin Somers <fridolin.somers@biblibre.com>
Date: Thu, 14 Aug 2014 15:15:48 +0200
Subject: [PATCH] [PASSED QA] Bug 12760 - add restrictions purge to cleanup_database.pl (followup 1)

Remove unused $query var
Correct redefined $count var

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
---
 misc/cronjobs/cleanup_database.pl |    3 +--
 1 files changed, 1 insertions(+), 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.7.2.5