From 9646584d3567099472b5a5a4ab7451cea5b0aebd Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 2 Aug 2010 12:17:50 +0000 Subject: [PATCH] stats hardening git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19341 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_stats.inc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gosa-core/include/class_stats.inc b/gosa-core/include/class_stats.inc index dc2f00b3a..441166924 100644 --- a/gosa-core/include/class_stats.inc +++ b/gosa-core/include/class_stats.inc @@ -63,6 +63,8 @@ class stats global $clicks; global $overallRenderTimer; + + if(!isset($clicks) || empty($clicks)) $clicks = 0; if(!isset($overallRenderTimer) || empty($overallRenderTimer)){ $renderTime = 0; }else{ @@ -74,12 +76,17 @@ class stats } + if(is_object($config) && $config instanceOf config){ + $uuid = $config->getGOsaUUID(); + }else{ + $uuid = ""; + } + $type = sqlite_escape_string($type); $plugin = sqlite_escape_string($plugin); $action = sqlite_escape_string($action); $timestamp = time(); $mtimestamp = microtime(TRUE); - $uuid = $config->getGOsaUUID(); $amount = sqlite_escape_string($amount); $duration = sqlite_escape_string($duration); $renderTime = sqlite_escape_string($renderTime); -- 2.30.2