summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f6cbbeb)
raw | patch | inline | side by side (parent: f6cbbeb)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 27 Jul 2006 11:54:01 +0000 (11:54 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 27 Jul 2006 11:54:01 +0000 (11:54 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4328 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_printGeneric.inc | patch | blob | history |
diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc
index 0d285eb70ca066fe000ef2f64839fdae3e68a779..27b4169a17157ef064d9247138c06a8b43715b08 100644 (file)
/* Write back to ldap */
$ldap= $this->config->get_ldap_link();
- if ($this->orig_dn == 'new'){
+ $ldap->cat($this->dn);
+ if($ldap->count() == 0){
$ldap->cd($this->config->current['BASE']);
$ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $this->dn));
$ldap->cd($this->dn);
$ldap->add($this->attrs);
$this->handle_post_events("add");
} else {
- if ($this->orig_dn != $this->dn){
+
+ if (($this->orig_dn != $this->dn) && (!$this->orig_dn == 'new')){
$this->move($this->orig_dn, $this->dn);
}