Code

Added uid to post events
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 15 Sep 2006 08:05:20 +0000 (08:05 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 15 Sep 2006 08:05:20 +0000 (08:05 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4684 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/gofax/faxaccount/class_gofaxAccount.inc
plugins/gofon/phoneaccount/class_phoneAccount.inc

index 6816987bfa2110288117a1de0eb99bcdc577c6e7..f96b9ab20579dd7751a2c06d45fae7b3e70b7465 100644 (file)
@@ -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));
     }
 
   }
index 7cb3aabf996eb7b35c9fe59128349f565c58843e..ee0aefa6ef0571d9423fd4d388e57a927df87ebc 100644 (file)
@@ -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));
   }