From: hickert Date: Tue, 20 Jun 2006 11:36:57 +0000 (+0000) Subject: Fixed snapshot generation to include all objects. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=55979a149bcd34b44ba61b414a6b2f666e0fd92c;p=gosa.git Fixed snapshot generation to include all objects. Only gosaDepartment && FAIclass will be skipped . git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3834 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/class_ldap.inc b/include/class_ldap.inc index 13da40948..71fcbb756 100644 --- a/include/class_ldap.inc +++ b/include/class_ldap.inc @@ -797,7 +797,7 @@ class LDAP{ } - function gen_ldif ($dn, $filter= "(objectClass=*)", $attributes= array('*'), $recursive= TRUE,$first = true) + function gen_ldif ($dn, $filter= "(objectClass=*)", $attributes= array('*'), $recursive= TRUE) { $display= ""; @@ -806,20 +806,13 @@ class LDAP{ $this->ls($filter,$dn, array('dn','objectClass')); $deps = array(); - if($first){ - $display .= $this->gen_one_entry($dn)."\n"; - } + $display .= $this->gen_one_entry($dn)."\n"; while ($attrs= $this->fetch()){ - $display.= $this->gen_one_entry($attrs['dn'], $filter, $attributes); - $display.= "\n"; - - if(in_array("organizationalUnit",$attrs['objectClass'])){ - $deps[] = $attrs['dn']; - } + $deps[] = $attrs['dn']; } foreach($deps as $dn){ - $display .= $this->gen_ldif($dn, $filter,$attributes,$recursive,false); + $display .= $this->gen_ldif($dn, $filter,$attributes,$recursive); } } else { $display.= $this->gen_one_entry($dn); diff --git a/include/class_plugin.inc b/include/class_plugin.inc index 1b0e3837d..66b13f7d4 100644 --- a/include/class_plugin.inc +++ b/include/class_plugin.inc @@ -1024,7 +1024,7 @@ class plugin /* Create object */ #$data = preg_replace('/^dn:.*\n/', '', $ldap->gen_ldif($this->dn,"(!(objectClass=gosaDepartment))")); - $data = $ldap->gen_ldif($this->dn,"(!(objectClass=gosaDepartment))"); + $data = $ldap->gen_ldif($this->dn,"(&(!(objectClass=gosaDepartment)(!(objectClass=FAIclass)))"); $newName = preg_replace("/\./", "", $sec."-".$usec); $target= array(); $target['objectClass'] = array("top", "gosaSnapshotObject");