From 2e912cd5466bb11de0245a92bcbf826bcf0cf44c Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 15 Sep 2006 08:05:20 +0000 Subject: [PATCH] Added uid to post events git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4684 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/gofax/faxaccount/class_gofaxAccount.inc | 12 +++++++++--- plugins/gofon/phoneaccount/class_phoneAccount.inc | 13 ++++++++++--- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/plugins/gofax/faxaccount/class_gofaxAccount.inc b/plugins/gofax/faxaccount/class_gofaxAccount.inc index 6816987bf..f96b9ab20 100644 --- a/plugins/gofax/faxaccount/class_gofaxAccount.inc +++ b/plugins/gofax/faxaccount/class_gofaxAccount.inc @@ -38,6 +38,8 @@ class gofaxAccount extends plugin var $out_blocklist_dialog= FALSE; var $current_blocklist= array(); + var $uid =""; + /* attribute list for save action */ var $attributes= array("goFaxDeliveryMode", "goFaxIsEnabled","goFaxRBlockgroups","facsimileAlternateTelephoneNumber","facsimileTelephoneNumber", "goFaxPrinter", "goFaxDivertNumber", "goFaxLanguage", "goFaxFormat", "mail"); @@ -48,6 +50,10 @@ class gofaxAccount extends plugin /* General initialization */ plugin::plugin ($config, $dn); + /* Set uid, it is used in handle_post_events */ + 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 @@ -612,7 +618,7 @@ class gofaxAccount extends plugin show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/fax account with dn '%s' failed."),$this->dn)); /* Optionally execute a command after we're done */ - $this->handle_post_events('remove'); + $this->handle_post_events('remove',array("uid"=> $this->uid)); } @@ -731,10 +737,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("mofify"); + $this->handle_post_events("mofidy",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 7cb3aabf9..ee0aefa6e 100644 --- a/plugins/gofon/phoneaccount/class_phoneAccount.inc +++ b/plugins/gofon/phoneaccount/class_phoneAccount.inc @@ -40,10 +40,17 @@ class phoneAccount extends plugin "telephoneNumber", "goFonMacro","macro"); var $objectclasses= array("goFonAccount"); + var $uid =""; + function phoneAccount ($config, $dn= NULL) { plugin::plugin ($config, $dn); + /* Set uid, it is used in handle_post_events */ + if(isset($this->attrs['uid'])){ + $this->uid = $this->attrs['uid'][0]; + } + /* Set phone hardware */ if (!isset($this->attrs['goFonHardware'])){ $this->goFonHardware= "automatic"; @@ -987,10 +994,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)); } } @@ -1146,7 +1153,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