From 505c3c67ecc659c321ed0cde0e30d303594780e9 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 17 Aug 2010 14:18:06 +0000 Subject: [PATCH] Updated stats handling. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19404 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_stats.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gosa-core/include/class_stats.inc b/gosa-core/include/class_stats.inc index 73dc76ca1..8d49c2f93 100644 --- a/gosa-core/include/class_stats.inc +++ b/gosa-core/include/class_stats.inc @@ -35,7 +35,7 @@ class stats if(!is_object($config) || ! $config instanceOf config){ return(NULL); } - + // Get statsFile property stats::$tableFile = $config->get_cfg_value('core', 'statsDatabaseFile'); stats::$statsEnabled = $config->boolValueIsTrue('core', 'statsDatabaseEnabled'); @@ -43,6 +43,9 @@ class stats return; } + // Append a date suffix to the database file, to prevent huge and unusable database files. + stats::$tableFile.= date('-Y_m_d'); + // Check for SQLite extension if(!stats::checkSQLiteExtension()){ return(NULL); -- 2.30.2