From b82c2df0022dbb07126f30febb4b566fedad937e Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 19 Aug 2010 07:27:42 +0000 Subject: [PATCH] Fixed stats handling git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19410 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_stats.inc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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){ -- 2.30.2