summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c0fd64a)
raw | patch | inline | side by side (parent: c0fd64a)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 5 Sep 2007 10:13:45 +0000 (10:13 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 5 Sep 2007 10:13:45 +0000 (10:13 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7228 594d385d-05f5-0310-b6e9-bd551577e9d8
index 9625dab37db813baa64b25614b63b75d3cc5dbd6..4365eb7d458ae4373f749e0a07db0da2bd8665e6 100644 (file)
*/
foreach($oldZones as $zone) {
$oldDn = "zoneName=".$zone['InitialzoneName'].",".$HostDn;
- $del[$oldDn] = "";
+ $del[$oldDn] = $zone;
}
/* Check for entries which must be updated
index 93343090ceb7de6024dd220f86d4d6c2bd26b55f..1fc5d0403601ae0daed72e172534147fa00a9dfe 100644 (file)
{
if($this->initially_was_account){
$bool = true;
+ $this->is_account = FALSE;
foreach($this->Zones as $key => $zone){
$bool= $bool & $this->RemoveZone($key);
}
foreach($tmp['zoneUpdates'] as $dn => $attrs){
$ldap->cd($dn);
$ldap->modify($attrs);
- $this->handle_post_events("modify",array("dn" => $dn));
new log("modfiy","unknown/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
show_ldap_error($ldap->get_error(), sprintf(_("Updating of system server/dns with dn '%s' failed."),$this->dn));
}
/* Delete dns
*/
foreach($tmp['del'] as $dn => $del){
+
+ $for = getNameFromMix($del['InitialzoneName']);
+ $rev = FlipIp(getNameFromMix($del['InitialReverseZone'])).".in-addr.arpa";
+
$ldap->cd($dn);
$ldap->rmdir_recursive($dn);
- $this->handle_post_events("remove",array("dn" => $dn));
new log("remove","unknown/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
show_ldap_error($ldap->get_error(), sprintf(_("Removing of system server/dns with dn '%s' failed."),$this->dn));
+
+ /* Handle Post events */
+ if(preg_match("/^zoneName=/",$dn)){
+ $this->handle_post_events("remove",array("dn" => $dn,"zoneName" => $for));
+ $this->handle_post_events("remove",array("dn" => $dn,"zoneName" => $rev));
+ }
}
/* move follwoing entries
if($ldap->fetch()){
$ldap->cd($dn);
$ldap->modify ($attrs);
- $this->handle_post_events("modify",array("dn" => $dn));
show_ldap_error($ldap->get_error(), sprintf(_("Saving of system server/dns with dn '%s' failed."),$this->dn));
+
+ /* Handle Post events */
+ if(preg_match("/^zoneName=/",$dn)){
+ $this->handle_post_events("modify",array("dn" => $dn,"zoneName" => $attrs['zoneName']));
+ }
}else{
$ldap->cd($dn);
$ldap->add($attrs);
- $this->handle_post_events("create",array("dn" => $dn));
show_ldap_error($ldap->get_error(), sprintf(_("Saving of system server/dns with dn '%s' failed."),$this->dn));
+
+ /* Handle Post events */
+ if(preg_match("/^zoneName=/",$dn)){
+ $this->handle_post_events("add",array("dn" => $dn,"zoneName" => $attrs['zoneName']));
+ }
}
}
}
diff --git a/plugins/admin/systems/class_servDNSeditZone.inc b/plugins/admin/systems/class_servDNSeditZone.inc
index c71fdf67b3bab1c0eabb4f96499a585d677e851e..1f1ee73a635b3734c4d03ea2afb711e25206232b 100644 (file)
}
}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;
}
}
diff --git a/plugins/admin/systems/class_servDNSeditZoneEntries.inc b/plugins/admin/systems/class_servDNSeditZoneEntries.inc
index 7eace297ac85e493bc416f8a1f77a09e80a08f13..30e26827326b18a174f5715dcd0499d774b076cd 100644 (file)
foreach($tmp['del'] as $dn => $del){
$ldap->cd($dn);
$ldap->rmdir_recursive($dn);
+ if(is_object($this->parent->parent)){
+ $this->parent->parent->handle_post_events("remove",array("dn" => $dn));
+ }
}
/* Add || Update new DNS entries
if(count($ldap->fetch())){
$ldap->cd($dn);
$ldap->modify ($attrs);
+ if(is_object($this->parent->parent)){
+ $this->parent->parent->handle_post_events("modify",array("dn" => $dn));
+ }
}else{
$ldap->cd($dn);
$ldap->add($attrs);
+ if(is_object($this->parent->parent)){
+ $this->parent->parent->handle_post_events("create",array("dn" => $dn));
+ }
}
}
}