Code

Updated terminal DNS.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 9 Jun 2009 12:36:01 +0000 (12:36 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 9 Jun 2009 12:36:01 +0000 (12:36 +0000)
- 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

index bcd889529413877d2a46f837b5f81b5685a8a784..cba4c1bf993aef67524529183b9acd064e8b79ec 100644 (file)
@@ -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();