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:48 +0000 (10:07 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 2 Aug 2010 10:07:48 +0000 (10:07 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19319 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/opsi/admin/opsiLicenses/class_licenseByProduct.inc

index 463939cc7f6e6ee3863da601a24a61e108fa94e6..830da19023f48c543ca7002d7a93e5a3a7a271a6 100644 (file)
@@ -31,6 +31,7 @@ class licenseByProduct extends plugin
 
     function __construct(&$config,$dn)
     {
+        $this->initTime = microtime(TRUE);
         $this->config = $config;
         $this->dn = $this->orig_dn = $dn;
         $this->si = new opsiLicenceHandler($this->config);
@@ -56,6 +57,10 @@ class licenseByProduct extends plugin
         $this->usageList->setHeight("300px");
         $this->usageList->setHeader(array(_("Host"),_("Key"),_("Pool"), _("License")));
         $this->usageList->setDefaultSortColumn(1);
+
+        // 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));
     }