From d99dd5bf1985e2e446464fd962c06e45e4fdf57f Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 20 Jun 2006 04:42:21 +0000 Subject: [PATCH] Made fen_ldif recursive git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3821 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_ldap.inc | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/include/class_ldap.inc b/include/class_ldap.inc index b2085531d..39482bf6a 100644 --- a/include/class_ldap.inc +++ b/include/class_ldap.inc @@ -803,19 +803,27 @@ class LDAP{ if ($recursive){ $this->cd($dn); - $this->search("$filter", array('dn')); + $this->ls($filter,$dn, array('dn','objectClass')); + $deps = array(); while ($attrs= $this->fetch()){ $display.= $this->gen_one_entry($attrs['dn'], $filter, $attributes); $display.= "\n"; + + if(in_array("organizationalUnit",$attrs['objectClass'])){ + $deps[] = $attrs['dn']; + } + } + foreach($deps as $dn){ + $display .= $this->gen_ldif($dn, $filter,$attributes,$recursive); } } else { $display.= $this->gen_one_entry($dn); } - return ($display); } -function gen_xls ($dn, $filter= "(objectClass=*)", $attributes= array('*'), $recursive= TRUE,$r_array=0) + + function gen_xls ($dn, $filter= "(objectClass=*)", $attributes= array('*'), $recursive= TRUE,$r_array=0) { $display= ""; -- 2.30.2