From: hickert Date: Mon, 2 Aug 2010 10:07:11 +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=58d2a1fcc77d3406a9855ea774e60c25f511d42b;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@19303 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_ldap.inc b/gosa-core/include/class_ldap.inc index 425058b5d..bac40e5e0 100644 --- a/gosa-core/include/class_ldap.inc +++ b/gosa-core/include/class_ldap.inc @@ -235,7 +235,10 @@ class LDAP{ } $this->log("LDAP operation: time=".(microtime(true)-$start)." operation=search('".LDAP::fix($this->basedn)."', '$filter')"); - stats::log('ldap', $class = get_class($this), $action = __FUNCTION__, $amount = 1, $duration = (microtime(TRUE) - $start)); + + // Create statistic table entry + stats::log('ldap', $class = get_class($this), $category = array(), $action = __FUNCTION__, + $amount = 1, $duration = (microtime(TRUE) - $start)); return($this->sr[$srp]); }else{ $this->error = "Could not connect to LDAP server"; @@ -269,7 +272,10 @@ class LDAP{ } $this->log("LDAP operation: time=".(microtime(true) - $start)." operation=ls('".LDAP::fix($basedn)."', '$filter')"); - stats::log('ldap', $class = get_class($this), $action = __FUNCTION__, $amount = 1, $duration = (microtime(TRUE) - $start)); + + // Create statistic table entry + stats::log('ldap', $class = get_class($this), $category = array(), $action = __FUNCTION__, + $amount = 1, $duration = (microtime(TRUE) - $start)); return($this->sr[$srp]); }else{ @@ -593,7 +599,10 @@ class LDAP{ if(!$this->success()){ $this->error.= $this->makeReadableErrors($this->error,$attrs); } - stats::log('ldap', $class = get_class($this), $action = __FUNCTION__, $amount = 1, $duration = (microtime(TRUE) - $start)); + + // Create statistic table entry + stats::log('ldap', $class = get_class($this), $category = array(), $action = __FUNCTION__, + $amount = 1, $duration = (microtime(TRUE) - $start)); return($r ? $r : 0); }else{ $this->error = "Could not connect to LDAP server"; @@ -611,7 +620,11 @@ class LDAP{ if(!$this->success()){ $this->error.= $this->makeReadableErrors($this->error,$attrs); } - stats::log('ldap', $class = get_class($this), $action = __FUNCTION__, $amount = 1, $duration = (microtime(TRUE) - $start)); + + // Create statistic table entry + stats::log('ldap', $class = get_class($this), $category = array(), $action = __FUNCTION__, + $amount = 1, $duration = (microtime(TRUE) - $start)); + return($r ? $r : 0); }else{ $this->error = "Could not connect to LDAP server";