Code

Updated stats handling.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 17 Aug 2010 14:18:06 +0000 (14:18 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 17 Aug 2010 14:18:06 +0000 (14:18 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19404 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_stats.inc

index 73dc76ca16337cf549ee1dde59a1f460834b9474..8d49c2f93e8ffb85b0eea798c86fea8de3a1cf22 100644 (file)
@@ -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);