From 131ea61982cbc86f12035b6fa49bbf6f201b21c7 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 16 Oct 2006 08:33:18 +0000 Subject: [PATCH] Move object first. To avoid objectClass errors git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4883 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_terminalGeneric.inc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/admin/systems/class_terminalGeneric.inc b/plugins/admin/systems/class_terminalGeneric.inc index de00c606e..1eab597c1 100644 --- a/plugins/admin/systems/class_terminalGeneric.inc +++ b/plugins/admin/systems/class_terminalGeneric.inc @@ -417,6 +417,12 @@ class termgeneric extends plugin /* Save to LDAP */ function save() { + + /* Move object if requested */ + if( $this->orig_dn != 'new' && $this->dn != $this->orig_dn){ + $this->move($this->orig_dn, $this->dn); + } + plugin::save(); /* Strip out 'default' values */ @@ -471,9 +477,6 @@ class termgeneric extends plugin $ldap->add($this->attrs); $this->handle_post_events("add"); } else { - if ($this->orig_dn != $this->dn){ - $this->move($this->orig_dn, $this->dn); - } $ldap->cd($this->dn); $this->cleanup(); $ldap->modify ($this->attrs); -- 2.30.2