From: hickert Date: Tue, 17 Aug 2010 14:18:06 +0000 (+0000) Subject: Updated stats handling. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=505c3c67ecc659c321ed0cde0e30d303594780e9;p=gosa.git Updated stats handling. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19404 594d385d-05f5-0310-b6e9-bd551577e9d8 --- 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);