diff --git a/plugins/admin/systems/class_servDNSeditZone.inc b/plugins/admin/systems/class_servDNSeditZone.inc
index 4bf1a422eca4529efcd9c74088928d18538ce846..d5df0871d9bbbb912ec1699716255342ccb2b451 100644 (file)
var $dialog = false;
+ var $zoneEditor = NULL;
+
var $isNew = true;
var $ZoneObject = array();
}else{
$this->ZoneObject = $attrs;
-
+ if(isset($attrs['zoneEditor'])){
+ $this->zoneEditor = $attrs['zoneEditor'];
+ }
$this->OldZoneName = $attrs['zoneName'];
$this->OldReverseZone = $attrs['ReverseZone'];
/* Detect Network class */
if(!empty($this->ReverseZone)){
- $dots = count(split(".",$this->ReverseZone));
- if($dots == 0){
+ $dots = count(split("\.",$this->ReverseZone));
+ if($dots == 1){
$this->NetworkClass = "A";
$this->ReverseZone .= ".0.0.0";
- }elseif($dots == 1){
+ }elseif($dots == 2){
$this->NetworkClass = "B";
$this->ReverseZone .= ".0.0";
}else{
}else{
$smarty->assign("AllowZoneEdit" , true);
if(isset($_POST['EditZoneEntries'])){
- $this->dialog= new servDNSeditZoneEntries($this->config,$this->dn,$this->ZoneObject);
- $this->dialog->parent = $this;
+ if($this->zoneEditor == NULL){
+ $this->zoneEditor= new servDNSeditZoneEntries($this->config,$this->dn,$this->ZoneObject);
+ $this->zoneEditor->parent = $this;
+ }
+ $this->dialog = $this->zoneEditor;
}
}
print_red($msg);
}
}else{
- $this->dialog->save();
- $rev = FlipIp(getNameFromMix($this->InitialReverseZone)).".in-addr.arpa";
- $for = getNameFromMix($this->InitialzoneName);
-
- $this->parent->handle_post_events("modify",array("dn" => $this->dn,"zoneName" => $rev));
- $this->parent->handle_post_events("modify",array("dn" => $this->dn,"zoneName" => $for));
- $this->dialog = false;
+ $this->zoneEditor = clone $this->dialog;
+ $this->dialog = FALSE;
+# $rev = FlipIp(getNameFromMix($this->InitialReverseZone)).".in-addr.arpa";
+# $for = getNameFromMix($this->InitialzoneName);
+#
+# $this->parent->handle_post_events("modify",array("dn" => $this->dn,"zoneName" => $rev));
+# $this->parent->handle_post_events("modify",array("dn" => $this->dn,"zoneName" => $for));
+# $this->dialog = false;
}
}
}
$ret['RECORDS'][] = array("type" => "nSRecord","value" => $ret['sOAprimary']) ;
+
+ $ret['zoneEditor'] = $this->zoneEditor;
return($ret);
}