From d5beed279b9493a39e66e0b14ff8719ad0b3e259 Mon Sep 17 00:00:00 2001 From: cajus Date: Tue, 31 Jan 2006 07:23:38 +0000 Subject: [PATCH 1/1] Removed timestamping - it cannot be disabled git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2605 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_ldap.inc | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/include/class_ldap.inc b/include/class_ldap.inc index 8d4d06aef..d97e1e01d 100644 --- a/include/class_ldap.inc +++ b/include/class_ldap.inc @@ -159,8 +159,6 @@ class LDAP{ function search($filter, $attrs= array()) { - $start = microtime(); - if($this->hascon){ if ($this->reconnect) $this->connect(); $this->clearResult(); @@ -169,30 +167,6 @@ class LDAP{ $this->resetResult(); $this->hasres=true; - /* Time management */ - $r = split(" ",$start); - $ms = $r[0]; - $s= $r[1]; - - $re = split(" ",microtime()); - $mse = $re[0]; - $se= $re[1]; - - $add = 0; - if(($mse -$ms)<0){ - $se --; - $add = 1; - } - $secs = ($se -$s); - $msecs = (int)(($add+($mse -$ms))*1000); - $time = $secs +($msecs/1000); - if($time > .2){ - $Sattrs = ""; - foreach($attrs as $att){ - $Sattrs .= " ".$att; - } - print_red(sprintf(_("Ldap search took about %s seconds, used filter '%s' with following attributes '%s '. Please check for performance improvements."),$time,htmlentities($filter),$Sattrs)); - } return($this->sr); }else{ $this->error = "Could not connect to LDAP server"; -- 2.30.2