Code

Fixed missing IP & Mac for new created objects
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 26 Apr 2006 11:33:51 +0000 (11:33 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 26 Apr 2006 11:33:51 +0000 (11:33 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3116 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_componentGeneric.inc

index e06e3cc37637dd6492384baa26a80621099dc8de..3b1f4168b91fe3f1f2eb623e21d772bc93bab8ce 100644 (file)
@@ -180,6 +180,13 @@ class componentGeneric extends plugin
       $this->attrs= $attrs;
     }
 
+    /* If this is a new Object IP & Mac aren't set.
+         IP & Mac are msut attributes, so we set this values by here. */
+    if($this->orig_dn == 'new'){
+      $this->attrs['ipHostNumber'] = $this->netConfigDNS->ipHostNumber;
+      $this->attrs['macAddress']  = $this->netConfigDNS->macAddress;
+    }
+
     /* Write back to ldap */
     $ldap= $this->config->get_ldap_link();
     if ($this->orig_dn == 'new'){
@@ -195,7 +202,7 @@ class componentGeneric extends plugin
 
       $ldap->cd($this->dn);
       $this->cleanup();
-$ldap->modify ($this->attrs); 
+      $ldap->modify ($this->attrs); 
 
       $this->handle_post_events("modify");
     }