From 9697d53338650e53b9550c38f4b6d783136846d6 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 15 Sep 2006 07:58:54 +0000 Subject: [PATCH] gofonaccount/gofaxaccount: Added uid to post events git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4683 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/gofax/faxaccount/class_gofaxAccount.inc | 12 +++++++++--- plugins/gofon/phoneaccount/class_phoneAccount.inc | 8 +++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/plugins/gofax/faxaccount/class_gofaxAccount.inc b/plugins/gofax/faxaccount/class_gofaxAccount.inc index 09051c0d5..c4cdf2a23 100644 --- a/plugins/gofax/faxaccount/class_gofaxAccount.inc +++ b/plugins/gofax/faxaccount/class_gofaxAccount.inc @@ -43,11 +43,17 @@ class gofaxAccount extends plugin "goFaxPrinter", "goFaxDivertNumber", "goFaxLanguage", "goFaxFormat", "mail"); var $objectclasses= array("goFaxAccount"); + var $uid= ""; + function gofaxAccount ($config, $dn= NULL) { /* General initialization */ plugin::plugin ($config, $dn); + /* Get user id */ + if(isset($this->attrs['uid'])){ + $this->uid = $this->attrs['uid'][0]; + } /* Hickert : 11.11.05 * Added to be able to handle department selection in divSelelect @@ -624,7 +630,7 @@ class gofaxAccount extends plugin show_ldap_error($ldap->get_error(), _("Removing FAX account failed")); /* Optionally execute a command after we're done */ - $this->handle_post_events('remove'); + $this->handle_post_events('remove',array("uid"=> $this->uid)); } @@ -745,10 +751,10 @@ class gofaxAccount extends plugin /* Optionally execute a command after we're done */ if ($this->initially_was_account == $this->is_account){ if ($this->is_modified){ - $this->handle_post_events("modify"); + $this->handle_post_events("modify",array("uid" => $this->uid)); } } else { - $this->handle_post_events("add"); + $this->handle_post_events("add",array("uid" => $this->uid)); } } diff --git a/plugins/gofon/phoneaccount/class_phoneAccount.inc b/plugins/gofon/phoneaccount/class_phoneAccount.inc index d83831215..44029b490 100644 --- a/plugins/gofon/phoneaccount/class_phoneAccount.inc +++ b/plugins/gofon/phoneaccount/class_phoneAccount.inc @@ -39,6 +39,8 @@ class phoneAccount extends plugin "goFonHardware","goFonPIN","goFonVoicemailPIN","telephoneNumber", "goFonMacro","macro"); var $objectclasses= array("goFonAccount"); + var $uid; + function phoneAccount ($config, $dn= NULL) { plugin::plugin ($config, $dn); @@ -967,10 +969,10 @@ class phoneAccount extends plugin if ($this->initially_was_account == $this->is_account){ if ($this->is_modified){ - $this->handle_post_events("modify"); + $this->handle_post_events("modify",array("uid" => $this->uid)); } } else { - $this->handle_post_events("add"); + $this->handle_post_events("add",array("uid" => $this->uid)); } } @@ -1126,7 +1128,7 @@ class phoneAccount extends plugin /* Optionally execute a command after we're done */ @mysql_close($r_con); - $this->handle_post_events('remove'); + $this->handle_post_events('remove',array("uid"=> $this->uid)); } -- 2.30.2