Code

Fixed problem with DNS Plugin
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 5 Oct 2009 09:50:51 +0000 (09:50 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 5 Oct 2009 09:50:51 +0000 (09:50 +0000)
-Saving a workstation twice caused duplicate and reversed iPHostNumber entries.

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

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

index 4ceb6fbcb486c0437c95d8e1776d295f1e6497dd..e08e9afddb7c0dde791fc1c558a1654b362fd9e8 100644 (file)
@@ -156,9 +156,10 @@ class termDNS extends plugin
        */
       $this->dnsEntry     = DNS::getDNSHostEntries($config,$this->OrigCn);
 
+      $ptr = DNS::FlipIp($this->get_pTRRecord());
+
       /* Remove A record which equals $this->ipHostNumber
        */
-      $ptr = $this->get_pTRRecord();
       foreach($this->dnsEntry['RECORDS'] as $key => $rec){
         if(($rec['type'] == "aRecord") && ($rec['value'] == $this->ipHostNumber)){
           unset($this->dnsEntry['RECORDS'][$key]);