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

gosa-core/include/class_management.inc

index 4c7b0ed11785928593a33251dd2eb0e75254e790..05070256b419b37265c6fecf83aae4ceebc3c737 100644 (file)
@@ -94,8 +94,9 @@ class management
     $this->config = $config;
     $this->initTime = microtime(TRUE);
 
-    stats::log('management', $class = get_class($this), $action = 'open', $amount = 1, 
-            $duration = (microtime(TRUE) - $this->initTime));
+    // Create statistic table entry 
+    stats::log('management', $class = get_class($this), $this->getAclCategories(),  $action = 'open', 
+            $amount = 1, $duration = (microtime(TRUE) - $this->initTime));
 
     if($this->cpHandler) $this->headpage->setCopyPasteHandler($this->cpHandler);
     if($this->snapHandler) $this->headpage->setSnapshotHandler($this->snapHandler);
@@ -133,6 +134,17 @@ class management
     #session::global_un_set(get_class($this)."_filter");
   }
 
+  
+  /*! \brief  Returns an array with all ACL-Categories we are responsible for.
+   */
+  function getAclCategories()
+  {
+      $ret= $this->aclCategory;
+      if(!is_array($ret)) $ret = array($ret);
+      return($ret);
+  }    
+
+
   /*! \brief  Execute this plugin
    *          Handle actions/events, locking, snapshots, dialogs, tabs,...
    */
@@ -441,8 +453,10 @@ class management
     if(isset($this->actions[$action['action']])){
       $func = $this->actions[$action['action']];
       if(!isset($action['targets']))$action['targets']= array(); 
-      stats::log('management', $class = get_class($this), $action['action'], $amount = count($action['targets']), 
-              $duration = (microtime(TRUE) - $this->initTime));
+
+      // Create statistic table entry 
+      stats::log('management', $class = get_class($this), $this->getAclCategories(),  $action['action'],
+              $amount = count($action['targets']), $duration = (microtime(TRUE) - $this->initTime));
 
       return($this->$func($action['action'],$action['targets'],$action));
     }