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

gosa-plugins/mit-krb5/admin/systems/services/kerberos/class_krb5_policy.inc

index 3379df4cc6688fb3ca770ea668ea60e1b3b90fe2..ef0f7de23ec9e760e6ce8af7f397a7345893ea8f 100644 (file)
@@ -37,6 +37,7 @@ class krb5_policy extends plugin
      */
     public function __construct($config,$entry,$parent)
     {
+      $this->initTime = microtime(TRUE);
         $this->config = $config;
         $this->parent = $parent;
         if(count($entry)){
@@ -53,6 +54,11 @@ class krb5_policy extends plugin
             $this->data['PW_MIN_LIFE']    = 36000;
         }
         $this->init_name = $this->name;
+
+        // 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));
+
     }