From: hickert Date: Tue, 9 Jun 2009 12:36:01 +0000 (+0000) Subject: Updated terminal DNS. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=962d90b96f800ba1c298e133955829ddfe1a5d73;p=gosa.git Updated terminal DNS. - If no IP address is given, then do not add the ipHost object class. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13700 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/systems/admin/systems/class_termDNS.inc b/gosa-plugins/systems/admin/systems/class_termDNS.inc index bcd889529..cba4c1bf9 100644 --- a/gosa-plugins/systems/admin/systems/class_termDNS.inc +++ b/gosa-plugins/systems/admin/systems/class_termDNS.inc @@ -712,6 +712,11 @@ class termDNS extends plugin $this->attrs['ipHostNumber'][] = $value; } + /* Do not add the objectClass ipHost if no ip address is given */ + if(!$this->attrs['ipHostNumber']){ + $this->attrs['objectClass'] = array_remove_entries(array("ipHost"),$this->attrs['objectClass']); + } + /* Write back to ldap */ $ldap->cd($this->dn); $this->cleanup();