summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 73511ba)
raw | patch | inline | side by side (parent: 73511ba)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 5 Sep 2007 10:05:51 +0000 (10:05 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 5 Sep 2007 10:05:51 +0000 (10:05 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7226 594d385d-05f5-0310-b6e9-bd551577e9d8
index 489ebfd113904c5929f59d0dc4fe373b46575535..703f3d30312a90ae909e1b2c58ddc2dc781c5fa4 100644 (file)
function remove_from_parent()
{
if($this->DNSinitially_was_account){
+ $this->is_account = FALSE;
$bool = true;
foreach($this->Zones as $key => $zone){
$bool= $bool & $this->RemoveZone($key);
/* 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);
show_ldap_error($ldap->get_error(), _("Removing DNS entries failed"));
- $this->handle_post_events("remove",array("dn" => $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
$ldap->cd($dn);
$ldap->modify ($attrs);
show_ldap_error($ldap->get_error(), _("Saving DNS entries failed"));
- $this->handle_post_events("modify",array("dn" => $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);
show_ldap_error($ldap->get_error(), _("Saving DNS entries failed"));
- $this->handle_post_events("add",array("dn" => $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 a8abbf8c9e43922df3b64d0a7fb490479c0b8333..02a887407c8096cd61d60eff0d1c173277805aad 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 4bd34bcccddd33cd09a8d3b3e3866453a29b104a..f317e1fb62ad191fa28ef9f5916ff72b8b896ea6 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));
- }
}
}
}