Code

Ensure we either call the plugins constructor or manually set the initTime variable...
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 2 Aug 2010 10:07:45 +0000 (10:07 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 2 Aug 2010 10:07:45 +0000 (10:07 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19318 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/opsi/admin/opsi/class_opsiware.inc

index f57403611bf6830593c37af44b31b6d8d0eda2b5..82b8c2d3d8dd243ae307602b09f1012b387dc49a 100644 (file)
@@ -21,10 +21,15 @@ class opsiWare extends plugin
 
     public function __construct($config,$hostId)
     {
+        $this->initTime = microtime(TRUE);
         $this->config = $config;
         $this->opsi   = new opsi($config);
         $this->hostId = preg_replace("/^opsi:=([^,]*),.*$/","\\1",$hostId);
         $this->init();
+
+        // Create statistic table entry
+        stats::log('plugin', $class = get_class($this), $category = array($this->acl_category),  $action = 'open',
+                $amount = 1, $duration = (microtime(TRUE) - $this->initTime));
     }
 
     private function init()