From: hickert Date: Wed, 8 Jul 2009 07:43:51 +0000 (+0000) Subject: Updated the dns plugin X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c0b95eb3dd7b15cdf8b492931d3c0bff9b53d4c1;p=gosa.git Updated the dns plugin - Ensure that we do not create zoneNames twice... git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13910 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/dns/admin/systems/services/dns/class_servDNSeditZone.inc b/gosa-plugins/dns/admin/systems/services/dns/class_servDNSeditZone.inc index b61601c6e..67f2c0df0 100644 --- a/gosa-plugins/dns/admin/systems/services/dns/class_servDNSeditZone.inc +++ b/gosa-plugins/dns/admin/systems/services/dns/class_servDNSeditZone.inc @@ -403,9 +403,15 @@ class servdnseditZone extends plugin { /* Call common method to give check the hook */ $message= plugin::check(); - + /* Check if zoneName is already in use */ $usedZones = $this->getUsedZoneNames(); + if($this->OldZoneName == "" && !empty($this->zoneName)){ + $tmp = trim($this->zoneName,".")."."; + if(isset($usedZones[$tmp])){ + $message[] = msgPool::duplicated(_("Zone name")); + } + } if(empty($this->zoneName)){ $message[] = msgPool::required(_("Zone name")); @@ -464,7 +470,7 @@ class servdnseditZone extends plugin default : trigger_error("Invalid network class given '".$this->NetworkClass."'"); } foreach($zones as $name => $data){ - if($data['ReverseZone'] == $test){ + if($data['ReverseZone'] == $test && $data['zoneName'] != $this->InitialzoneName){ $message[] = msgPool::duplicated(_("Network address")); } }