Code

Update & Save roomNumber if base changed
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 16 Oct 2006 06:52:48 +0000 (06:52 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 16 Oct 2006 06:52:48 +0000 (06:52 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4882 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_terminalGeneric.inc

index da6f3710a6220d9b47947b472cd798d69f5033b7..72e8cc5784434d0352d2b37c8d0dab4dda7a0643 100644 (file)
@@ -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;