Code

Addd comment
[gosa.git] / gosa-core / include / class_management.inc
index 2769a57458d14dfc453cd63976f743640248fab0..60eb713e84fb19439e8a95c32765c2f9b261cd9a 100644 (file)
@@ -141,9 +141,6 @@ class management
       $this->filter->update();
       session::global_set(get_class($this)."_filter", $this->filter);
       session::set('autocomplete', $this->filter);
-      if (!$this->filter->isValid()){
-        msg_dialog::display(_("Filter error"), _("The filter is incomplete!"), ERROR_DIALOG);
-      }
     }
 
     // Handle actions (POSTs and GETs)
@@ -914,6 +911,31 @@ class management
   {
     return(is_object($this->tabObject) || is_object($this->dialogObject));
   }
+
+
+  /*! \brief    Forward command execution request
+   *             to the correct method.
+   */
+  function handle_post_events($mode, $addAttrs= array())
+  {
+    if(!in_array($mode, array('add','remove','modify'))){
+      trigger_error(sprintf("Invalid post event type given '%s'! Valid types are [add,modify,remove].", $mode));
+      return;
+    }
+    switch ($mode){
+      case "add":
+        plugin::callHook($this,"POSTCREATE", $addAttrs);
+      break;
+
+      case "modify":
+        plugin::callHook($this,"POSTMODIFY", $addAttrs);
+      break;
+
+      case "remove":
+        plugin::callHook($this,"POSTREMOVE", $addAttrs);
+      break;
+    }
+  }
 }
 
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: