Code

Add ns record automatically
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 27 Aug 2007 09:03:02 +0000 (09:03 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 27 Aug 2007 09:03:02 +0000 (09:03 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7143 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_termDNS.inc

index 154eac38fe108a95d5d6aaa107d784cad56afe01..de022df190782325ccd281775a946365edca00b5 100644 (file)
@@ -602,6 +602,10 @@ class termDNS extends plugin
        */
       if(!empty($this->ipHostNumber)){
         $this->dnsEntry['RECORDS'][] = array("type"=>"aRecord","value"=>$this->ipHostNumber);
+        $ldap->cat(getDNSZoneDN($this->config,$this->dnsEntry['zoneName']));
+        $attrs = $ldap->fetch();
+        $str = trim(preg_replace("/(^[^ ]*).*$/","\\1",$attrs['sOARecord'][0]));
+        $this->dnsEntry['RECORDS'][] = array("type"=>"nsRecord","value"=>$str);
       }
 
       /* Create diff and follow instructions