Code

Added post create to client dhcp save
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 19 Oct 2007 13:44:52 +0000 (13:44 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 19 Oct 2007 13:44:52 +0000 (13:44 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7605 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_termDNS.inc

index f242f3e2f02ebc531a75933f90929716535a5ed0..ce3b7ca42f2549e030a8ff2581bb1df6d8abcc76 100644 (file)
@@ -576,6 +576,9 @@ class termDNS extends plugin
       if($this->initial_dhcp_is_Account && !$this->dhcp_is_Account){
         $ldap->rmdir_recursive($this->dhcpHostEntry['dn']);
         show_ldap_error($ldap->get_error(),_("Removing dhcp entry for this object failed."));
+
+        $tmp = new servdhcp($this->config,$this->dhcpParentNode);
+        $tmp->handle_post_events("remove");
       }
 
       /* DHCP Added */
@@ -590,6 +593,10 @@ class termDNS extends plugin
         unset($attrs['dn']);
         $ldap->cd($dn);
         $res = $ldap->add($attrs);
+
+        $tmp = new servdhcp($this->config,$this->dhcpParentNode);
+        $tmp->handle_post_events("add");
+
 #        print_a($attrs);
 #        print("cn=".$this->cn.",".$this->dhcpParentNode);
         show_ldap_error($ldap->get_error(),_("Tried to add new dhcp entry failed."));
@@ -607,6 +614,10 @@ class termDNS extends plugin
           unset($attrs['MODIFIED']);
           $ldap->cd("cn=".$this->cn.",".$this->dhcpParentNode);
           $res = $ldap->add($attrs);
+
+          $tmp = new servdhcp($this->config,$this->dhcpParentNode);
+          $tmp->handle_post_events("modify");
+
           show_ldap_error($ldap->get_error(),_("Tried to add new dhcp entry failed."));
           if($res){
             $ldap->rmdir_recursive($this->dhcpHostEntry['dn']);
@@ -622,6 +633,10 @@ class termDNS extends plugin
           unset($attrs['MODIFIED']);
           $ldap->cd($this->dhcpHostEntry['dn']);
           $ldap->modify($attrs);
+          
+          $tmp = new servdhcp($this->config,$this->dhcpParentNode);
+          $tmp->handle_post_events("modify");
+
           show_ldap_error($ldap->get_error(),_("Modifying dhcp entry failed."));
         }    
       }