From 962d90b96f800ba1c298e133955829ddfe1a5d73 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 9 Jun 2009 12:36:01 +0000 Subject: [PATCH] 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 --- gosa-plugins/systems/admin/systems/class_termDNS.inc | 5 +++++ 1 file changed, 5 insertions(+) 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(); -- 2.30.2