Code

Ensure that a valid department is selected in the management dialogs.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 24 Jun 2008 12:07:48 +0000 (12:07 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 24 Jun 2008 12:07:48 +0000 (12:07 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11417 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_MultiSelectWindow.inc

index c82429d196a880cf8817dc5cabb60eef15de1b2d..c77f07b6497d1a9e1619e30b16b17430bd96ee3c 100644 (file)
@@ -63,6 +63,11 @@ class MultiSelectWindow{
 
        function ClearElementsList()
        {
+    $ui =get_userinfo();
+    $deps = $ui->get_module_departments($this->module);
+    if(!in_array($this->selectedBase, $deps)){
+      $this->selectedBase = array_shift($deps);
+    }
                $this->array_Elements = array();
        }