Code

Fixed class seperation
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 1 Feb 2008 13:10:21 +0000 (13:10 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 1 Feb 2008 13:10:21 +0000 (13:10 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8721 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index c560c36ac0b63afdbf76f7d08c7982ee1d97fc26..20db6f1d8b3e947d6701eab6f7e1e7d0be1b0f98 100644 (file)
@@ -175,8 +175,8 @@ class DNS
         unset($Zones[$zoneName]);
       }else{
         $tmp = $ldap->fetch();
-        $Zones[$zoneName]['ReverseZone']        = FlipIp(str_replace(".in-addr.arpa","",$tmp['zoneName'][0]));
-        $Zones[$zoneName]['InitialReverseZone'] = FlipIp(str_replace(".in-addr.arpa","",$tmp['zoneName'][0]));
+        $Zones[$zoneName]['ReverseZone']        = DNS::FlipIp(str_replace(".in-addr.arpa","",$tmp['zoneName'][0]));
+        $Zones[$zoneName]['InitialReverseZone'] = DNS::FlipIp(str_replace(".in-addr.arpa","",$tmp['zoneName'][0]));
       }
     }
     return($Zones);
@@ -191,7 +191,7 @@ class DNS
    */
   static function getDNSZoneEntriesDiff($config,$newZones,$HostDn)
   {
-    $oldZones = getDNSZoneEntries($config,$HostDn,true);
+    $oldZones = DNS::getDNSZoneEntries($config,$HostDn,true);
 
     $sOAattributes =  array("sOAprimary","sOAmail","sOAserial","sOArefresh","sOAretry","sOAexpire","sOAttl");
 
@@ -256,9 +256,9 @@ class DNS
       if(!empty($zone['InitialReverseZone'])){
         if($zone['InitialReverseZone'] != $zone['ReverseZone']){
           $base = "zoneName=".$zone['zoneName'].",".$HostDn;
-          $oldRDn = "zoneName=". FlipIp($zone['InitialReverseZone']).".in-addr.arpa,".$base; 
-          $newRDn = "zoneName=". FlipIp($zone['ReverseZone']).".in-addr.arpa,".$base;
-          $PrePareZoneEntries[FlipIp($zone['InitialReverseZone']).".in-addr.arpa"] = FlipIp($zone['ReverseZone']).".in-addr.arpa";
+          $oldRDn = "zoneName=". DNS::FlipIp($zone['InitialReverseZone']).".in-addr.arpa,".$base; 
+          $newRDn = "zoneName=". DNS::FlipIp($zone['ReverseZone']).".in-addr.arpa,".$base;
+          $PrePareZoneEntries[DNS::FlipIp($zone['InitialReverseZone']).".in-addr.arpa"] = DNS::FlipIp($zone['ReverseZone']).".in-addr.arpa";
           $move [$oldRDn] = $newRDn;
         }
       }
@@ -289,7 +289,7 @@ class DNS
       /* Create Reverse Entry 
        * And append it to our add queue
        */
-      $zone['ReverseZone'] = FlipIp($zone['ReverseZone']).".in-addr.arpa";
+      $zone['ReverseZone'] = DNS::FlipIp($zone['ReverseZone']).".in-addr.arpa";
       $base = "zoneName=".$zone['zoneName'].",".$HostDn;
       $newRDn = "zoneName=".$zone['ReverseZone'].",".$base;
       $rObj = $obj;
@@ -434,7 +434,7 @@ class DNS
   {
     global $RecordTypes;
 
-    $oldEntry = getDNSHostEntries($config,$oldName);
+    $oldEntry = DNS::getDNSHostEntries($config,$oldName);
 
     $add    = array();
     $del    = array();
index 6ccbade692e77f74a600de34b8a4356280924141..9242662a8edd3d9424f65274a001c8d89a519600 100644 (file)
@@ -354,7 +354,7 @@ class servdnseditZone extends plugin
     $smarty->assign("NetworkClasses",  array("A"=>"255.0.0.0 (Class A)","B"=>"255.255.0.0 (Class B)","C"=>"255.255.255.0 (Class C)"));
 
     /* Display tempalte */
-    $display.= $smarty->fetch(get_template_path('servdnseditzone.tpl', TRUE));
+    $display.= $smarty->fetch(get_template_path('servdnseditzone.tpl', TRUE, dirname(__FILE__)));
     return($display);
   }