From 37632c58ef37c8706ab339946f9f4380dc88b69b Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 10 Aug 2006 11:45:54 +0000 Subject: [PATCH] Added user headpage department selector fix. Just for testing. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4469 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/users/class_divListUsers.inc | 23 +++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/plugins/admin/users/class_divListUsers.inc b/plugins/admin/users/class_divListUsers.inc index cef09a331..12a847efc 100644 --- a/plugins/admin/users/class_divListUsers.inc +++ b/plugins/admin/users/class_divListUsers.inc @@ -83,11 +83,24 @@ class divListUsers extends MultiSelectWindow #$ui= get_userinfo(); #$t= $ui->get_module_departments("users"); #print_a($t); - foreach ($this->config->idepartments as $key => $value){ - if ($this->selectedBase == $key){ - $options.= ""; - } else { - $options.= ""; + + + /* Get all departments within this subtree */ + $base = $this->config->current['BASE']; + $deps= get_list("(&(|(ou=*)(description=*))(objectClass=gosaDepartment))", $this->module, $base, + array("ou", "description"), GL_SIZELIMIT); + + $ids = $this->config->idepartments; + + foreach($deps as $dep){ + if(isset($ids[$dep['dn']])){ + + $value = $ids[$dep['dn']]; + if ($this->selectedBase == $dep){ + $options.= ""; + } else { + $options.= ""; + } } } -- 2.30.2