From: hickert Date: Thu, 19 Aug 2010 07:27:42 +0000 (+0000) Subject: Fixed stats handling X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b82c2df0022dbb07126f30febb4b566fedad937e;p=gosa.git Fixed stats handling git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19410 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_stats.inc b/gosa-core/include/class_stats.inc index d5e56ede0..0a4c474a0 100644 --- a/gosa-core/include/class_stats.inc +++ b/gosa-core/include/class_stats.inc @@ -26,6 +26,12 @@ class stats { // We cannot log while the path to store logs in is empty. global $config; + + // Check if Logging is enabled + if(!is_object($config) || ! $config instanceOf config){ + return(NULL); + } + $path = $config->get_cfg_value('core', 'statsDatabaseDirectory'); if(empty($path)){ return(NULL); @@ -53,11 +59,6 @@ class stats return(stats::$lastHandle[$filename]); } - // Check if Logging is enabled - if(!is_object($config) || ! $config instanceOf config){ - return(NULL); - } - // Get statsFile property stats::$statsEnabled = $config->boolValueIsTrue('core', 'statsDatabaseEnabled'); if(!stats::$statsEnabled){