From: hickert Date: Mon, 2 Aug 2010 12:17:50 +0000 (+0000) Subject: stats hardening X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9646584d3567099472b5a5a4ab7451cea5b0aebd;p=gosa.git stats hardening git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19341 594d385d-05f5-0310-b6e9-bd551577e9d8 --- 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);