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

gosa-plugins/ssh/personal/ssh/class_sshPublicKey.inc

index 95a4042db57f8bb54e26fc06e9ebc057cd358b0b..e478d329ba771dee39127431fa15bcc8da445703 100644 (file)
@@ -34,6 +34,7 @@ class sshPublicKey extends plugin
   function sshPublicKey(&$config, $dn, $acl)
   {
     /* Configuration is fine, allways */
+    $this->initTime = microtime(TRUE);
     $this->config= &$config;
     $this->dn= $dn;
     $this->acl= $acl;
@@ -63,6 +64,10 @@ class sshPublicKey extends plugin
 
     // Save copy for later usage
     $this->storedPublicKeys= $this->publicKeys;
+
+    // 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));
   }