From d7f14d3fd1636399ab9254befc68826e5327a02b Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Tue, 09 Dec 2008 16:18:34 -0500
Subject: [PATCH] enable ispconfig logging in database.

---
 server/cron_daily.php |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/server/cron_daily.php b/server/cron_daily.php
index a54b07f..1dab45c 100644
--- a/server/cron_daily.php
+++ b/server/cron_daily.php
@@ -125,9 +125,18 @@
 	}
 }
 
+#######################################################################################################
+// Cleanup logs in database
+#######################################################################################################
+//* Keep 7 days in sys_log
+$tstamp = time() - (60*60*24*7);
+$sql = "DELETE FROM sys_log WHERE tstamp < $tstamp";
+$app->db->query($sql);
 
-
-
+//* Keep 7 days in sys_datalog
+$tstamp = time() - (60*60*24*7);
+$sql = "DELETE FROM sys_datalog WHERE tstamp < $tstamp";
+$app->db->query($sql);
 
 
 die("finished.\n");

--
Gitblit v1.9.1