From: hickert Date: Tue, 24 Jun 2008 12:07:48 +0000 (+0000) Subject: Ensure that a valid department is selected in the management dialogs. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=daa439eb7255c3dab0261e703c8df4a277a1520a;p=gosa.git 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 --- 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(); }