From: hickert Date: Mon, 21 May 2007 06:34:33 +0000 (+0000) Subject: Added mac and ip to post events X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=dab41343df7dce7d6cc4d3a9a6f1d9828ac99b1a;p=gosa.git Added mac and ip to post events git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6404 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_phoneGeneric.inc b/plugins/admin/systems/class_phoneGeneric.inc index 5f2fd4220..3c9d8150e 100644 --- a/plugins/admin/systems/class_phoneGeneric.inc +++ b/plugins/admin/systems/class_phoneGeneric.inc @@ -274,7 +274,7 @@ class phoneGeneric extends plugin @log::log("remove","phone/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); show_ldap_error($ldap->get_error(), sprintf(_("Removing of system phone/generic with dn '%s' failed."),$this->dn)); - $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']); @@ -400,7 +400,7 @@ class phoneGeneric extends plugin $ldap->cd($this->dn); $ldap->add($this->attrs); @log::log("create","phone/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); - $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); @@ -420,7 +420,7 @@ 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); diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc index 9000b008b..64a3ebc36 100644 --- a/plugins/admin/systems/class_printGeneric.inc +++ b/plugins/admin/systems/class_printGeneric.inc @@ -595,7 +595,7 @@ class printgeneric extends plugin @log::log("remove","printer/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); show_ldap_error($ldap->get_error(), sprintf(_("Removing of system print/generic with dn '%s' failed."),$this->dn)); - $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']); @@ -829,13 +829,13 @@ 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)); @log::log("create","printer/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } 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)); @log::log("modify","printer/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } show_ldap_error($ldap->get_error(), sprintf(_("Saving of system print/generic with dn '%s' failed."),$this->dn)); diff --git a/plugins/admin/systems/class_servGeneric.inc b/plugins/admin/systems/class_servGeneric.inc index 691853b4b..4fa00a01a 100644 --- a/plugins/admin/systems/class_servGeneric.inc +++ b/plugins/admin/systems/class_servGeneric.inc @@ -250,7 +250,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)); } @@ -362,7 +362,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)); } } diff --git a/plugins/admin/systems/class_terminalGeneric.inc b/plugins/admin/systems/class_terminalGeneric.inc index 722347908..68d4987d9 100644 --- a/plugins/admin/systems/class_terminalGeneric.inc +++ b/plugins/admin/systems/class_terminalGeneric.inc @@ -355,7 +355,7 @@ class termgeneric extends plugin show_ldap_error($ldap->get_error(), sprintf(_("Removing of object system terminal/generic with dn '%s' failed."),$this->dn)); /* 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']); @@ -518,13 +518,13 @@ class termgeneric extends plugin } $ldap->add($this->attrs); @log::log("create","terminal/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); - $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); @log::log("modify","terminal/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); - $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 */ diff --git a/plugins/admin/systems/class_workstationGeneric.inc b/plugins/admin/systems/class_workstationGeneric.inc index 1f1338a01..4604c98a7 100644 --- a/plugins/admin/systems/class_workstationGeneric.inc +++ b/plugins/admin/systems/class_workstationGeneric.inc @@ -340,7 +340,7 @@ class workgeneric extends plugin show_ldap_error($ldap->get_error(), sprintf(_("Removing of system workstation/generic with dn '%s' failed."),$this->dn)); /* Optionally execute a command after we're done */ - $this->handle_post_events("remove", array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS- >ipHostNumber)); + $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']); @@ -499,7 +499,7 @@ class workgeneric extends plugin @log::log("create","workstation/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); show_ldap_error($ldap->get_error(), sprintf(_("Saving of system workstation/generic with dn '%s' failed."),$this->dn)); if(!$this->didAction){ - $this->handle_post_events("add",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS- >ipHostNumber)); + $this->handle_post_events("add",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber)); } } else { if ($this->orig_dn != $this->dn){