From: hickert Date: Mon, 2 Aug 2010 10:07:45 +0000 (+0000) Subject: Ensure we either call the plugins constructor or manually set the initTime variable... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f07cee3c279e8062414ab76db9d49de8499eaf3e;p=gosa.git Ensure we either call the plugins constructor or manually set the initTime variable for the new statistics plugin. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19318 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/opsi/admin/opsi/class_opsiware.inc b/gosa-plugins/opsi/admin/opsi/class_opsiware.inc index f57403611..82b8c2d3d 100644 --- a/gosa-plugins/opsi/admin/opsi/class_opsiware.inc +++ b/gosa-plugins/opsi/admin/opsi/class_opsiware.inc @@ -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()