From 3fdad4379cddc96fc012c29a7c496b319ea72d50 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 22 Oct 2009 12:46:51 +0000 Subject: [PATCH] Increase thje zones SOA Record number in case of zone modifications . git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14617 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../systems/admin/systems/class_termDNS.inc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/gosa-plugins/systems/admin/systems/class_termDNS.inc b/gosa-plugins/systems/admin/systems/class_termDNS.inc index e08e9afdd..60e2cb626 100644 --- a/gosa-plugins/systems/admin/systems/class_termDNS.inc +++ b/gosa-plugins/systems/admin/systems/class_termDNS.inc @@ -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: -- 2.30.2