Code

Updated department management
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 23 Feb 2010 14:42:37 +0000 (14:42 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 23 Feb 2010 14:42:37 +0000 (14:42 +0000)
-Updated dep list on remove too.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15678 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/admin/departments/class_departmentManagement.inc

index de84cf952a69427b16557338b8058bd491d002e4..adf3ee14d37c42c1e5eeb5da3eada458bcf4026b 100644 (file)
@@ -114,14 +114,7 @@ class departmentManagement extends management
     $str = management::saveChanges();
     if(!empty($str)) return($str);
 
-  
-    global $config; 
-    $config->get_departments();
-    $config->make_idepartments();
-    $this->config = $config;
-    $headpage = $this->getHeadpage();
-    $headpage->refreshBasesList();
-
+    $this->refreshDeps(); 
     $plugname = $this->last_tabObject->base_name;
     if($this->last_tabObject->by_object[$plugname]->must_be_tagged()){
       $smarty = get_smarty();
@@ -130,6 +123,17 @@ class departmentManagement extends management
       return($smarty->fetch(get_template_path("dep_iframe.tpl",TRUE)));
     }
   }
+
+  
+  function refreshDeps()
+  {
+    global $config; 
+    $config->get_departments();
+    $config->make_idepartments();
+    $this->config = $config;
+    $headpage = $this->getHeadpage();
+    $headpage->refreshBasesList();
+  }
  
 
   // An action handler which enables to switch into deparmtment by clicking the names.
@@ -159,6 +163,13 @@ class departmentManagement extends management
     return("<a href='?plug=".$_GET['plug']."&amp;PID=$pid&amp;act=listing_open_$row' title='$dn'>$ou</a>");
   }
 
+  
+  // Finally remove departments and update departmnet browsers
+  function removeEntryConfirmed($action="",$target=array(),$all=array(),$altTabClass="",$altTabType="",$altAclCategory="")
+  {
+    management::removeEntryConfirmed($action,$target,$all, $altTabClass,$altTabType,$altAclCategory);
+    $this->refreshDeps();
+  }
 
   /*! \brief  Returns information about all container types that GOsa con handle.
     @return Array   Informations about departments supported by GOsa.