Code

Increase thje zones SOA Record number in case of zone modifications .
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 22 Oct 2009 12:46:51 +0000 (12:46 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 22 Oct 2009 12:46:51 +0000 (12:46 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14617 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/systems/admin/systems/class_termDNS.inc

index e08e9afddb7c0dde791fc1c558a1654b362fd9e8..60e2cb626fed1c88f5b2c4c7e0c13cf666125cb1 100644 (file)
@@ -893,6 +893,10 @@ class termDNS extends plugin
         $this->dnsEntry['exists'] = $this->DNS_is_account;
         $tmp = DNS::getDNSHostEntriesDiff($this->config,$this->OrigCn,$this->dnsEntry,$this->cn);
       }   
+    
+      /* Update SOA record if needed
+       */
+      $this->updateSOARecord();
 
       /* move follwoing entries 
        */
@@ -1195,6 +1199,15 @@ class termDNS extends plugin
       }
     }
   }
+
+  function updateSOARecord()
+  {
+    $oldEntries = DNS::getDNSHostEntries($this->config,$this->OrigCn);
+    $newEntries = $this->dnsEntry;
+    if(array_differs($newEntries['RECORDS'],$oldEntries['RECORDS'])){
+      DNS::touchDNSZone($this->config,$this->dnsEntry['zoneName']);
+    }
+  }
 }
 
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: