summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 47b05be)
raw | patch | inline | side by side (parent: 47b05be)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 29 Oct 2007 08:53:36 +0000 (08:53 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 29 Oct 2007 08:53:36 +0000 (08:53 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7681 594d385d-05f5-0310-b6e9-bd551577e9d8
index 5ca4a91fcb41db15e69890ce6233327f8c4745d0..77f74690f64b135f7cc897a726108849d5a17b0b 100644 (file)
if($old_dn == "new"){
$old_dn = $this->dn;
}
+
+ /* Save zone editor changes now */
+ foreach($this->Zones as $name => $zone){
+ if(isset($zone['zoneEditor'] ) && $zone['zoneEditor'] != NULL && is_object($zone['zoneEditor'])){
+ $zone['zoneEditor']->save();
+ unset($this->Zones[$name]['zoneEditor']);;
+ }
+ }
/* Update dns to current object dn */
$tmp = getDNSZoneEntriesDiff($this->config,$this->Zones,$old_dn);
diff --git a/plugins/admin/systems/class_servDNSeditZone.inc b/plugins/admin/systems/class_servDNSeditZone.inc
index 69590cea6d691a3775a0118f6d23c5b323ed0e18..c06b42ce8f767393fd8770f4430ca1350d727afd 100644 (file)
var $dialog = false;
+ var $zoneEditor = NULL;
+
var $isNew = true;
var $cn;
var $ZoneObject = array();
}else{
$this->ZoneObject = $attrs;
-
+ if(isset($attrs['zoneEditor'])){
+ $this->zoneEditor = $attrs['zoneEditor'];
+ }
$this->OldZoneName = $attrs['zoneName'];
$this->OldReverseZone = $attrs['ReverseZone'];
}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);
}
diff --git a/plugins/admin/systems/class_servDNSeditZoneEntries.inc b/plugins/admin/systems/class_servDNSeditZoneEntries.inc
index f5e7136110d85fc63c624ada305def1bdb24b47c..e1d836c0c85b4bb9c3653caa8462767a4bdcb482 100644 (file)
if(!isset($tmp[$Rec['type']])){
$tmp[$Rec['type']] = "";
}else{
- $message[] = sprintf(_("The record type '%s' is a unique type and can't be defined twice."),$type);
+ $message[] = sprintf(_("The record type '%s' is a unique type and can't be defined twice."),$Rec['type']);
}
}
diff --git a/plugins/admin/systems/servDNSeditZoneEntries.tpl b/plugins/admin/systems/servDNSeditZoneEntries.tpl
index 0396575621171ae6869ac771ab7587e0e822e92c..9c0428c29d58795aa28029bf97225bd7f7ad7290 100644 (file)
<h2>{t}This dialog allows you to configure all components of this DNS zone on a single list.{/t}</h2>
-{t}Be careful editing record types with this dialog. All changes will be saved immediately when using the save button.{/t}
-<br>
-<br>
<p class="seperator"> </p>
{if $disableDialog}
<br><b>