From daa439eb7255c3dab0261e703c8df4a277a1520a Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 24 Jun 2008 12:07:48 +0000 Subject: [PATCH] Ensure that a valid department is selected in the management dialogs. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11417 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_MultiSelectWindow.inc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gosa-core/include/class_MultiSelectWindow.inc b/gosa-core/include/class_MultiSelectWindow.inc index c82429d19..c77f07b64 100644 --- a/gosa-core/include/class_MultiSelectWindow.inc +++ b/gosa-core/include/class_MultiSelectWindow.inc @@ -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(); } -- 2.30.2