From b4ed37579b3c93fa3b0b1426f155e717c1476694 Mon Sep 17 00:00:00 2001 From: cajus Date: Mon, 7 Dec 2009 12:35:27 +0000 Subject: [PATCH] Updated systemmanagement and dns git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14870 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../systems/admin/systems/class_systemManagement.inc | 6 ++++-- gosa-plugins/systems/admin/systems/class_termDNS.inc | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/gosa-plugins/systems/admin/systems/class_systemManagement.inc b/gosa-plugins/systems/admin/systems/class_systemManagement.inc index 9caaffdcf..65f3dddd9 100644 --- a/gosa-plugins/systems/admin/systems/class_systemManagement.inc +++ b/gosa-plugins/systems/admin/systems/class_systemManagement.inc @@ -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){ diff --git a/gosa-plugins/systems/admin/systems/class_termDNS.inc b/gosa-plugins/systems/admin/systems/class_termDNS.inc index 60e2cb626..389b9dc12 100644 --- a/gosa-plugins/systems/admin/systems/class_termDNS.inc +++ b/gosa-plugins/systems/admin/systems/class_termDNS.inc @@ -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); } } -- 2.30.2