Code

Added additional net property save *before* we call the save hook
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 13 Aug 2008 15:30:32 +0000 (15:30 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 13 Aug 2008 15:30:32 +0000 (15:30 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12211 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc

index abc4967247aa657a7a2871ef3b99c8ae39bbe2cb..11623ba1d4a8095c52d366ea724e215fea4eb243 100644 (file)
@@ -590,6 +590,10 @@ class workgeneric extends plugin
       if (!$ldap->success()){
         msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
       }
+
+      $this->netConfigDNS->cn = $this->cn;
+      $this->netConfigDNS->save();
+
       $this->handle_post_events("add",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
     } else {
       if ($this->orig_dn != $this->dn){
@@ -604,6 +608,10 @@ class workgeneric extends plugin
         msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));
       }
       new log("modify","workstation/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+
+      $this->netConfigDNS->cn = $this->cn;
+      $this->netConfigDNS->save();
+
       $this->handle_post_events("modify",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
     }
 
@@ -612,9 +620,6 @@ class workgeneric extends plugin
       $this->netConfigDNS->macAddress = "-";
     }
 
-    $this->netConfigDNS->cn = $this->cn;
-    $this->netConfigDNS->save();
-
     if ($activate && class_available("DaemonEvent")){
 
       /* Send installation activation