Code

Udpated dns post handling for zoneeditor
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 4 Sep 2007 12:55:36 +0000 (12:55 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 4 Sep 2007 12:55:36 +0000 (12:55 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7213 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_servDNSeditZone.inc
plugins/admin/systems/class_servDNSeditZoneEntries.inc

index c36446b9dd17634a14644e0607ade517ab66b2e5..a8abbf8c9e43922df3b64d0a7fb490479c0b8333 100644 (file)
@@ -210,6 +210,7 @@ class servdnseditZone extends plugin
       $smarty->assign("AllowZoneEdit" , true);
       if(isset($_POST['EditZoneEntries'])){
         $this->dialog= new servDNSeditZoneEntries($this->config,$this->dn,$this->ZoneObject);
+        $this->dialog->parent = $this;
       }
     }
 
index a77f6c6d3942250cd2df0d781d78d997dd0083da..4bd34bcccddd33cd09a8d3b3e3866453a29b104a 100644 (file)
@@ -301,7 +301,6 @@ class servDNSeditZoneEntries extends plugin
 
     $todo = array(); 
 
-
     /* Create todolist
      */
     foreach($this->Devices as $name => $dev){
@@ -347,6 +346,9 @@ class servDNSeditZoneEntries extends plugin
     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
@@ -357,9 +359,15 @@ class servDNSeditZoneEntries extends plugin
       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));
+        }
       }
     }
   }