Code

Updated systemmanagement and dns
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 7 Dec 2009 12:35:27 +0000 (12:35 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 7 Dec 2009 12:35:27 +0000 (12:35 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14870 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index 9caaffdcf557651f865ac4f4ab4e12c09e51ac4f..65f3dddd99ebc9d7f6bb2f15241dfcd3605311eb 100644 (file)
@@ -1470,15 +1470,17 @@ class systems extends plugin
       }
       $terminal             = $entry;
       $terminal['type']     = "O";
+      $terminal['cn'][0]    = preg_replace('/\..*$/', '$', $terminal['cn'][0]);
       $this->terminals[] = $terminal;
     }
 
     $tmp  =array();
     $tmp2 =array();
     foreach($this->terminals as $tkey => $val ){
-      $tmp[strtolower($val['cn'][0]).$val['dn']]=$val;
-      $tmp2[strtolower($val['cn'][0]).$val['dn']] = strtolower($val['cn'][0]).$val['dn'];
+      $tmp[strtolower($val['cn'][0])]=$val;
+      $tmp2[strtolower($val['cn'][0])] = strtolower($val['cn'][0]);
     }
+
     natcasesort($tmp2);
     $this->terminals=array();
     foreach($tmp2 as $val){
index 60e2cb626fed1c88f5b2c4c7e0c13cf666125cb1..389b9dc12439382de8e070662bb5b0b2fb4c8019 100644 (file)
@@ -393,7 +393,7 @@ class termDNS extends plugin
       if(isset($_POST['propose_ip']) && $this->acl_is_writeable("ipHostNumber")){
         foreach($this->Zones as $key => $name){
           if($name == $this->dnsEntry['zoneName']){
-            $net = DNS::FlipIp(str_replace(".in-addr.arpa","",DNS::getNameFromMix($key)));
+            $net = DNS::FlipIp(str_replace(".in-addr.arpa.","",DNS::getNameFromMix($key)));
             $this->ipHostNumber = $this->generateRandomIP($net);
           }
         }