From: hickert Date: Mon, 2 Aug 2010 10:08:12 +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=a07fe32a08b08d14fa00f83e47313b1840ff5da0;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@19328 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpPlugin.inc b/gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpPlugin.inc index 8697308f6..d6cbccf6a 100644 --- a/gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpPlugin.inc +++ b/gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpPlugin.inc @@ -36,6 +36,7 @@ class dhcpPlugin extends plugin function dhcpPlugin(&$parent,$attrs) { + $this->initTime = microtime(TRUE); $this->parent = $parent; $this->options = new dhcpOption(); @@ -79,6 +80,11 @@ class dhcpPlugin extends plugin /* Save CN for later reference */ $this->orig_cn= $this->cn; + + // 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)); + } function execute()