summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 67c90e3)
raw | patch | inline | side by side (parent: 67c90e3)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 20 Jun 2006 10:50:59 +0000 (10:50 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 20 Jun 2006 10:50:59 +0000 (10:50 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3833 594d385d-05f5-0310-b6e9-bd551577e9d8
include/class_ldap.inc | patch | blob | history | |
include/class_plugin.inc | patch | blob | history | |
plugins/admin/departments/class_departmentManagement.inc | patch | blob | history |
diff --git a/include/class_ldap.inc b/include/class_ldap.inc
index 39482bf6a0a6193e244742f4b4eb64292cdd96e9..13da40948e31f36d373bc416cc6cc576b56dea0c 100644 (file)
--- a/include/class_ldap.inc
+++ b/include/class_ldap.inc
}
- function gen_ldif ($dn, $filter= "(objectClass=*)", $attributes= array('*'), $recursive= TRUE)
+ function gen_ldif ($dn, $filter= "(objectClass=*)", $attributes= array('*'), $recursive= TRUE,$first = true)
{
$display= "";
$this->cd($dn);
$this->ls($filter,$dn, array('dn','objectClass'));
$deps = array();
+
+ if($first){
+ $display .= $this->gen_one_entry($dn)."\n";
+ }
+
while ($attrs= $this->fetch()){
$display.= $this->gen_one_entry($attrs['dn'], $filter, $attributes);
$display.= "\n";
}
}
foreach($deps as $dn){
- $display .= $this->gen_ldif($dn, $filter,$attributes,$recursive);
+ $display .= $this->gen_ldif($dn, $filter,$attributes,$recursive,false);
}
} else {
$display.= $this->gen_one_entry($dn);
{
if($this->reconnect) $this->connect();
-
-
$ret = false;
$rows= split("\n",$str_attr);
$data= false;
}
}
}
- }
+ }
+
/* If dn is an index of data, we should try to insert the data */
if(isset($data['dn'])) {
/* Creating Entry */
index d3515c98cb954b5eaef0b900d739cd558d49960b..1b0e3837d319d397fcef08139bffee6f1511feb0 100644 (file)
--- a/include/class_plugin.inc
+++ b/include/class_plugin.inc
$new_base = preg_replace("/".normalizePreg($base)."$/","",$base_of_object).$snap_base;
/* Create object */
- $data = preg_replace('/^dn:.*\n/', '', $ldap->gen_ldif($this->dn,"(!(objectClass=gosaDepartment))"));
+ #$data = preg_replace('/^dn:.*\n/', '', $ldap->gen_ldif($this->dn,"(!(objectClass=gosaDepartment))"));
+ $data = $ldap->gen_ldif($this->dn,"(!(objectClass=gosaDepartment))");
$newName = preg_replace("/\./", "", $sec."-".$usec);
$target= array();
$target['objectClass'] = array("top", "gosaSnapshotObject");
/* Prepare import string */
$data = gzuncompress($ldap_to->get_attribute($dn,'gosaSnapshotData'));
- $data = "dn: ".$restoreObject['gosaSnapshotDN'][0]."\n".$data;
-
+// $data = "dn: ".$restoreObject['gosaSnapshotDN'][0]."\n".$data;
+
/* Import the given data */
$ldap->import_complete_ldif($data,$err,true,true);
show_ldap_error($ldap_to->get_error().$err, _("Restore snapshot failed."));
diff --git a/plugins/admin/departments/class_departmentManagement.inc b/plugins/admin/departments/class_departmentManagement.inc
index eeb9d53eae2bd18050a6a8c2a828b4a489927d1f..abcf27081e829650c397a29f9655c4759edc8213 100644 (file)
}else{
/* Check if there is a snapshot dialog open */
- if($str = $this->showSnapshotDialog($this->DivListDepartment->selectedBase,"")){
+ if($str = $this->showSnapshotDialog($this->DivListDepartment->selectedBase,$this->DivListDepartment->selectedBase)){
return($str);
}