Code

unified post event handling!
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 3 Mar 2010 08:38:04 +0000 (08:38 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 3 Mar 2010 08:38:04 +0000 (08:38 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15874 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/gofon/gofon/conference/class_phoneConferenceGeneric.inc

index 1895d9c0c1783a4514591d8cd17dd6511f8f14e5..2e1e58ec26c934847392c1dc4951785d288190c2 100644 (file)
@@ -746,12 +746,12 @@ class conference extends plugin
       $ldap->cd($this->dn);
       $this->cleanup();
       $ldap->modify ($this->attrs); 
-      $this->handle_post_events('modify');
+      $mode = 'modify';
     } else {
       $ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $this->dn));
       $ldap->cd($this->dn);
       $ldap->add($this->attrs);
-      $this->handle_post_events('add');
+      $mode = 'add';
     }
 
     /* Log last action */
@@ -763,10 +763,9 @@ class conference extends plugin
 
     if (!$ldap->success()){
       msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+    }else{
+      $this->handle_post_events($mode);
     }
-
-    /* Optionally execute a command after we're done */
-    $this->postcreate();
   }