From: hickert Date: Thu, 10 Aug 2006 11:45:54 +0000 (+0000) Subject: Added user headpage department selector fix. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=37632c58ef37c8706ab339946f9f4380dc88b69b;p=gosa.git 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 --- 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.= ""; + } } }