diff --git a/include/functions.inc b/include/functions.inc
index 7c9427a6062cdde50d1e0f189917281ed622daeb..d93aa89095ea95dc1562d330af0273c7ea62fecb 100644 (file)
--- a/include/functions.inc
+++ b/include/functions.inc
@@ -508,7 +508,7 @@ function get_list($filter, $subtreeACL, $base= "", $attributes= array(), $flags=
if ($flags & GL_SUBSEARCH) {
$ldap->search ($filter, $attributes);
} else {
- $ldap->ls ($filter);
+ $ldap->ls ($filter,$base,$attributes);
}
/* Check for size limit exceeded messages for GUI feedback */
if ($dn == $ignore_dn){
continue;
}
- $result[convert_department_dn($dn)]= $dn;
+
+ /* Only assign non-root departments */
+ if ($dn != $result['/']){
+ $result[convert_department_dn($dn)]= $dn;
+ }
}
return ($result);
return (TRUE);
}
- return preg_match ("/^[0-9 ()+*-]+$/", $nr);
+ return preg_match ("/^[\/0-9 ()+*-]+$/", $nr);
}
}
+/* Resturns the difference between to microtime() results in float */
+function get_MicroTimeDiff($start , $stop)
+{
+ $a = split("\ ",$start);
+ $b = split("\ ",$stop);
+
+ $secs = $b[1] - $a[1];
+ $msecs= $b[0] - $a[0];
+
+ $ret = (float) ($secs+ $msecs);
+ return($ret);
+}
+
+
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>