Code

Fixed post events for systems
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 21 May 2007 07:28:50 +0000 (07:28 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 21 May 2007 07:28:50 +0000 (07:28 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@6408 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_componentGeneric.inc
plugins/admin/systems/class_phoneGeneric.inc
plugins/admin/systems/class_printGeneric.inc
plugins/admin/systems/class_servGeneric.inc
plugins/admin/systems/class_terminalGeneric.inc
plugins/admin/systems/class_workstationGeneric.inc

index 3c318ad5e4f97ae82e33dff739152325435c85af..2463ca1173fd6aa6d51cc818c293de483c675bdb 100644 (file)
@@ -100,7 +100,7 @@ class componentGeneric extends plugin
     $this->netConfigDNS->remove_from_parent();
     $ldap->rmdir($this->dn);
     show_ldap_error($ldap->get_error(), _("Removing generic component failed"));
-    $this->handle_post_events("remove");
+    $this->handle_post_events("remove",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
 
     /* Delete references to object groups */
     $ldap->cd ($this->config->current['BASE']);
@@ -206,7 +206,7 @@ class componentGeneric extends plugin
       $ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $this->dn));
       $ldap->cd($this->dn);
       $ldap->add($this->attrs);
-      $this->handle_post_events("add");
+      $this->handle_post_events("add",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
     } else {
       if ($this->orig_dn != $this->dn){
         $this->move($this->orig_dn, $this->dn);
@@ -216,18 +216,14 @@ class componentGeneric extends plugin
       $this->cleanup();
       $ldap->modify ($this->attrs); 
 
-      $this->handle_post_events("modify");
+      $this->handle_post_events("modify",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
     }
 
     $this->netConfigDNS->cn = $this->cn;
     $this->netConfigDNS->save($this->dn);
 
     show_ldap_error($ldap->get_error(), _("Saving generic component failed"));
-
-    /* Optionally execute a command after we're done */
-    $this->postcreate();
   }
-
 }
 
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
index 659b1910a5c2e1d96ebb578c9934f2036128a7ff..d0811490260f28bcbdbdef69cdfc9340df824a85 100644 (file)
@@ -245,7 +245,7 @@ class phoneGeneric extends plugin
     $this->netConfigDNS->remove_from_parent();
     $ldap->rmdir($this->dn);
     show_ldap_error($ldap->get_error(), _("Removing phone failed"));
-    $this->handle_post_events("remove");
+    $this->handle_post_events("remove",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
 
     /* Delete references to object groups */
     $ldap->cd ($this->config->current['BASE']);
@@ -372,7 +372,7 @@ class phoneGeneric extends plugin
       $ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $this->dn));
       $ldap->cd($this->dn);
       $ldap->add($this->attrs);
-      $this->handle_post_events("add");
+      $this->handle_post_events("add",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
     } else {
       if ($this->orig_dn != $this->dn){
         $this->move($this->orig_dn, $this->dn);
@@ -391,14 +391,11 @@ class phoneGeneric extends plugin
         $usertab->save();
         unset($usertab);
       }
-      $this->handle_post_events("modify");
+      $this->handle_post_events("modify",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
     }
     $this->netConfigDNS->cn = $this->cn;    
     $this->netConfigDNS->save($this->dn);
     show_ldap_error($ldap->get_error(), _("Saving phone failed"));
-
-    /* Optionally execute a command after we're done */
-    $this->postcreate();
   }
 
 }
index 3a5a975c6d5a3ad299641368076849c83b1ab3c8..bb9d23c8da70a5c366516f2947370d9d299f0190 100644 (file)
@@ -576,7 +576,7 @@ class printgeneric extends plugin
       $this->netConfigDNS->remove_from_parent();
       $ldap->rmdir($this->dn);
       show_ldap_error($ldap->get_error(), _("Removing printer failed"));
-      $this->handle_post_events("remove");
+      $this->handle_post_events("remove",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
 
       /* Delete references to object groups */
       $ldap->cd ($this->config->current['BASE']);
@@ -806,7 +806,7 @@ class printgeneric extends plugin
       }
       
       $ldap->add($this->attrs);
-      $this->handle_post_events("add");
+      $this->handle_post_events("add",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
     } else {
       if ($this->orig_dn != $this->dn){
         $this->move($this->orig_dn, $this->dn);
@@ -816,7 +816,7 @@ class printgeneric extends plugin
       $this->cleanup();
       $ldap->modify ($this->attrs); 
 
-      $this->handle_post_events("modify");
+      $this->handle_post_events("modify",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
     }
     show_ldap_error($ldap->get_error(), _("Saving printer failed"));
 
@@ -827,9 +827,6 @@ class printgeneric extends plugin
       $this->netConfigDNS->save($this->dn);
     }
 
-    /* Optionally execute a command after we're done */
-    $this->postcreate();
-
     /* This is a multi object. Handle tagging here... */
     $this->handle_object_tagging();
   }
index cc756c73e6228d9297efda0e66a2c09715ea6cb1..941ec08c7151c0098de6e6ae18de5b9c6687c406 100644 (file)
@@ -209,7 +209,7 @@ class servgeneric extends plugin
       unset($og->member[$this->dn]);
       $og->save ();
     }
-    $this->handle_post_events("remove", array("macAddress" => $this->netConfigDNS->macAddress));
+    $this->handle_post_events("remove", array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
   }
 
 
@@ -318,7 +318,7 @@ class servgeneric extends plugin
 
     /* Optionally execute a command after we're done */
     if(!$this->didAction){
-      $this->handle_post_events($mode);
+      $this->handle_post_events($mode,array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
     }
   }
 
index 2ff3021eb0fe3b45ad9218bf25dcf5c4af99457b..353ee0d324e67eeeaaaecd467bb0f957faf3256e 100644 (file)
@@ -324,7 +324,7 @@ class termgeneric extends plugin
       show_ldap_error($ldap->get_error(), _("Removing terminal failed"));
 
       /* Optionally execute a command after we're done */
-      $this->handle_post_events("remove", array("macAddress" => $this->netConfigDNS->macAddress));
+      $this->handle_post_events("remove",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
 
       /* Delete references to object groups */
       $ldap->cd ($this->config->current['BASE']);
@@ -485,12 +485,12 @@ class termgeneric extends plugin
         unset($this->attrs['gotoNtpServer']);
       }
       $ldap->add($this->attrs);
-      $this->handle_post_events("add");
+      $this->handle_post_events("add",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
     } else {
       $ldap->cd($this->dn);
       $this->cleanup();
       $ldap->modify ($this->attrs); 
-      $this->handle_post_events("modify");
+      $this->handle_post_events("modify",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
     }
     
     /* cn=default and macAddress=- indicates that this is a template */ 
@@ -501,9 +501,6 @@ class termgeneric extends plugin
     $this->netConfigDNS->cn = $this->cn;
     $this->netConfigDNS->save($this->dn);
     show_ldap_error($ldap->get_error(), _("Saving terminal failed"));
-
-    /* Optionally execute a command after we're done */
-    $this->postcreate();
   }
 
 }
index a40eb93555946c4bfb29fe3f16963b44a01d5389..bc5217c17aeed4e2cb9dd81ec04d6bcffe8f9cdb 100644 (file)
@@ -296,7 +296,7 @@ class workgeneric extends plugin
     show_ldap_error($ldap->get_error(), _("Removing workstation failed"));
 
     /* Optionally execute a command after we're done */
-    $this->handle_post_events("remove", array("macAddress" => $this->netConfigDNS->macAddress));
+    $this->handle_post_events("remove", array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
 
     /* Delete references to object groups */
     $ldap->cd ($this->config->current['BASE']);
@@ -448,7 +448,7 @@ class workgeneric extends plugin
       $ldap->add($this->attrs);
       show_ldap_error($ldap->get_error(), _("Saving workstation failed"));
       if(!$this->didAction){
-        $this->handle_post_events("add");
+        $this->handle_post_events("add",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
       }
     } else {
       if ($this->orig_dn != $this->dn){
@@ -459,7 +459,7 @@ class workgeneric extends plugin
       $ldap->modify ($this->attrs); 
 
       if(!$this->didAction){
-        $this->handle_post_events("modify");
+        $this->handle_post_events("modify",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
       }
     }