From: hickert Date: Wed, 26 Apr 2006 11:33:51 +0000 (+0000) Subject: Fixed missing IP & Mac for new created objects X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=64d0b0a56e252b125e0c1a61d97f46007c0c478b;p=gosa.git Fixed missing IP & Mac for new created objects git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3116 594d385d-05f5-0310-b6e9-bd551577e9d8 --- 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"); }