Code

Updated height of filter editor
[gosa.git] / gosa-core / plugins / admin / departments / class_departmentManagement.inc
index ac40ce0629b5351a7497c663b7cdb23f05460b31..adf3ee14d37c42c1e5eeb5da3eada458bcf4026b 100644 (file)
@@ -44,6 +44,7 @@ class departmentManagement extends management
     } else {
       $filter = new filter(get_template_path("dep-filter.xml", true));
     }
+    $filter->setObjectStorage(array(''));
 
     // Build headpage
     $headpage = new listing(get_template_path("dep-list.xml", true));
@@ -110,15 +111,10 @@ class departmentManagement extends management
   // Overriden save handler - We've to take care about the department tagging here.
   protected function saveChanges()
   {
-    management::saveChanges();
-  
-    global $config; 
-    $config->get_departments();
-    $config->make_idepartments();
-    $this->config = $config;
-    $headpage = $this->getHeadpage();
-    $headpage->refreshBasesList();
+    $str = management::saveChanges();
+    if(!empty($str)) return($str);
 
+    $this->refreshDeps(); 
     $plugname = $this->last_tabObject->base_name;
     if($this->last_tabObject->by_object[$plugname]->must_be_tagged()){
       $smarty = get_smarty();
@@ -127,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.
@@ -156,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.