Code

Updated nSRecord handling
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 6 Oct 2009 07:18:31 +0000 (07:18 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 6 Oct 2009 07:18:31 +0000 (07:18 +0000)
-Add a trailing dot at the end of nSRecords - for full qualified host names only

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14531 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/dns/admin/systems/services/dns/class_servDNSeditZone.inc

index 67f2c0df084550212475afe57aa91bfb50eef05b..cc1daff377d33244e30bcc1e052ac14e65bf73e4 100644 (file)
@@ -548,8 +548,10 @@ class servdnseditZone extends plugin
     $ret['sOAmail']            = preg_replace("/\@/",".",$this->sOAmail);
 
     foreach(array("sOAprimary","zoneName","sOAmail") as $attr){
+
+      // Append trailing dots if we've full qualified host names.
       if(!preg_match("/\.$/",$ret[$attr])){
-        if(!tests::is_ip($ret[$attr])){
+        if(!tests::is_ip($ret[$attr]) && preg_match("/\./",$ret[$attr])){
           $ret[$attr] = $ret[$attr].".";
         }
       }