summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a79b9f3)
raw | patch | inline | side by side (parent: a79b9f3)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 28 Aug 2007 13:55:19 +0000 (13:55 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 28 Aug 2007 13:55:19 +0000 (13:55 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7157 594d385d-05f5-0310-b6e9-bd551577e9d8
include/functions_dns.inc | patch | blob | history | |
plugins/admin/systems/class_servDNS.inc | patch | blob | history | |
plugins/admin/systems/class_servDNSeditZone.inc | patch | blob | history |
index f24ec32473c67c3d1415e0ff87a0bdffc832efa6..42f0519647412c8e4c6efa0ee0bd5f1c4fdad17f 100644 (file)
$soa.=" ".$zone[$attr];
}
$obj['sOARecord'] = trim($soa);
+ $obj['nSRecord'] = $zone['sOAprimary'];
/* If reverse zone was renamed, move entry
*/
/* Add new Records
*/
foreach($zone['RECORDS'] as $rec){
+ if(!isset($obj[$rec['type']])||!is_array($obj[$rec['type']])){
+ $obj[$rec['type']] = array();
+ }
$obj[$rec['type']][] = $rec['value'];
}
$ptrObj = $baseObj;
$reverseName = getNameFromMix($reverseNameMix);
$ptrObj['zoneName'] = $reverseName;
- $ptrObj['pTRRecord'] = $newName.".".$zoneName.".";
+ $ptrObj['pTRRecord'] = preg_replace("/\.\.$/",".",$newName.".".$zoneName.".");
$ptrObj['relativeDomainName'] = $rec['value'];
$add[$PTRdn] = $ptrObj;
index d2ebb5d8e091ed5578c872220dbbdf5c763975c7..34af08f036d34feaa0d3c684b86d4427693ea521 100644 (file)
}
}
+ if(isset($_GET['act']) && $_GET['act'] == "edit" && isset($_GET['id'])){
+ $id = base64_decode($_GET['id']);
+ if(isset($this->Zones[$id])){
+ $this->dialog= new servdnseditZone($this->config,$this->dn,$this->Zones[$id]);
+ }
+ }
+
/* Show dialog
*/
if($this->dialog!= NULL){
$link = "<a href='?plug=".$_GET['plug']."&act=edit&id=%s'>%s</a>";
foreach($this->Zones as $zone => $values ){
-
$ZoneList->AddEntry(array(
- array("string" => sprintf($link,base64_encode($zone),$zone)),
- array("string" => sprintf($link,base64_encode($zone),_("Reverse zone")." : ".$values['ReverseZone'])),
+ array("string" => sprintf($link,base64_encode($zone),($zone))),
+ array("string" => sprintf($link,base64_encode($zone),_("Reverse zone")." : ".($values['ReverseZone']))),
array("string" => _("TTL")." : ".$values['sOAttl']),
array("string" => _("Class")." : ".$values['dNSClass']),
array("string" =>str_replace("%s",base64_encode($zone),$editImg))
diff --git a/plugins/admin/systems/class_servDNSeditZone.inc b/plugins/admin/systems/class_servDNSeditZone.inc
index af3803fe2f801f00adf917d527a67c9c3a80d2c5..500739c2de922f341798d697f82088087a136dad 100644 (file)
$tmp2[$tmp[0]] = $rec;
unset($this->Records[$key]);
}
+ if($rec['type'] == "nSRecord"){
+ unset($this->Records[$key]);
+ }
}
if(count($tmp2) != 0){
reset($tmp2);
}
/* Check class for given Zone Address */
- $addr = preg_replace("/^[^\/]+\//","",$this->ReverseZone);
-
+ $addr = preg_replace("/^[^\/]*+\//","",$this->ReverseZone);
+
/* Check for valid&complete IP address */
if(!is_ip($addr)){
$message[] = _("The given network address is not a valid, please specify a valid IP address.");
foreach(array("sOAprimary","zoneName","sOAmail") as $attr){
if(!preg_match("/\.$/",$ret[$attr])){
- $ret[$attr] = $ret[$attr].".";
+ if(!is_ip($ret[$attr])){
+ $ret[$attr] = $ret[$attr].".";
+ }
}
}
+ $ret['RECORDS'][] = array("type" => "nSRecord","value" => $ret['sOAprimary']) ;
return($ret);
}