summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2a26ca5)
raw | patch | inline | side by side (parent: 2a26ca5)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 31 Jan 2006 07:23:38 +0000 (07:23 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 31 Jan 2006 07:23:38 +0000 (07:23 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2605 594d385d-05f5-0310-b6e9-bd551577e9d8
include/class_ldap.inc | patch | blob | history |
diff --git a/include/class_ldap.inc b/include/class_ldap.inc
index 8d4d06aef576e62556a9818eb963a9dfb0db83dc..d97e1e01d0c6a57ead142fb72a64bcc8a2d300d8 100644 (file)
--- a/include/class_ldap.inc
+++ b/include/class_ldap.inc
function search($filter, $attrs= array())
{
- $start = microtime();
-
if($this->hascon){
if ($this->reconnect) $this->connect();
$this->clearResult();
$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";