From 64d0b0a56e252b125e0c1a61d97f46007c0c478b Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 26 Apr 2006 11:33:51 +0000 Subject: [PATCH] Fixed missing IP & Mac for new created objects git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3116 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_componentGeneric.inc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/admin/systems/class_componentGeneric.inc b/plugins/admin/systems/class_componentGeneric.inc index e06e3cc37..3b1f4168b 100644 --- a/plugins/admin/systems/class_componentGeneric.inc +++ b/plugins/admin/systems/class_componentGeneric.inc @@ -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"); } -- 2.30.2