From 319129f5cb0f0610bdc0428948e31f139f0fc0cf Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 16 Oct 2006 06:52:48 +0000 Subject: [PATCH] Update & Save roomNumber if base changed git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4882 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_terminalGeneric.inc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/plugins/admin/systems/class_terminalGeneric.inc b/plugins/admin/systems/class_terminalGeneric.inc index da6f3710a..72e8cc578 100644 --- a/plugins/admin/systems/class_terminalGeneric.inc +++ b/plugins/admin/systems/class_terminalGeneric.inc @@ -405,6 +405,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 */ @@ -459,13 +465,9 @@ 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); - $this->handle_post_events("modify"); } $this->netConfigDNS->cn = $this->cn; -- 2.30.2