Code

Updated department management
[gosa.git] / gosa-core / include / class_management.inc
index 6eababcf81ca6ed95ca0ed05d169e90fe236af0e..eb8af6df705f58168cac95fc01f2c4168eed6a31 100644 (file)
@@ -239,7 +239,7 @@ class management
    *  @param  Array   'target'  A list of object dns, which should be affected by this method.
    *  @param  Array   'all'     A combination of both 'action' and 'target'.
    */
-  protected function removeEntryRequested($action,$target,$all)
+  protected function removeEntryRequested($action="",$target=array(),$all=array())
   {
     $disallowed = array();
     $this->dns = array();
@@ -287,8 +287,16 @@ class management
    *  @param  Array   'target'  A list of object dns, which should be affected by this method.
    *  @param  Array   'all'     A combination of both 'action' and 'target'.
    */
-  function removeEntryConfirmed($action="",$target=array(),$all=array())
+  function removeEntryConfirmed($action="",$target=array(),$all=array(),
+      $altTabClass="",$altTabType="",$altAclCategory="")
   {
+    $tabType = $this->tabType;
+    $tabClass = $this->tabClass;
+    $aclCategory = $this->aclCategory;
+    if(!empty($altTabClass)) $tabClass = $altTabClass;
+    if(!empty($altTabType)) $tabType = $altTabType;
+    if(!empty($altAclCategory)) $aclCategory = $altAclCategory;
+
     foreach($this->dns as $key => $dn){
 
       // Check permissions, are we allowed to remove this object? 
@@ -297,8 +305,7 @@ class management
 
         // Delete the object
         $this->dn = $dn;
-        $tab = $this->tabClass;
-        $this->tabObject= new $tab($this->config,$this->config->data['TABS'][$this->tabType], $this->dn, $this->aclCategory);
+        $this->tabObject= new $tabClass($this->config,$this->config->data['TABS'][$tabType], $this->dn, $aclCategory);
         $this->tabObject->set_acl_base($this->dn);
         $this->tabObject->delete ();