From 4dc7bf7d0a7629414544c0d607231fd1641760e2 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 21 May 2007 12:47:47 +0000 Subject: [PATCH] Updated list git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6424 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/users/class_divListUsers.inc | 24 ++++++++++++++-------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/plugins/admin/users/class_divListUsers.inc b/plugins/admin/users/class_divListUsers.inc index cca776319..c73fe97aa 100644 --- a/plugins/admin/users/class_divListUsers.inc +++ b/plugins/admin/users/class_divListUsers.inc @@ -89,19 +89,25 @@ class divListUsers extends MultiSelectWindow $base = $this->config->current['BASE']; /* Add base */ - $deps[] = array("dn"=>$this->config->current['BASE']); - $deps= array_merge($deps,get_list("(&(|(ou=*)(description=*))(objectClass=gosaDepartment))", $this->module, $base, + $tmp = array(); + $tmp[] = array("dn"=>$this->config->current['BASE']); + $tmp= array_merge($tmp,get_list("(&(|(ou=*)(description=*))(objectClass=gosaDepartment))", $this->module, $base, array("ou", "description"), GL_SIZELIMIT | GL_SUBSEARCH)); + + $deps = array(); + foreach($tmp as $tm){ + $deps[$tm['dn']] = $tm['dn']; + } + /* Load possible departments */ $ui= get_userinfo(); $tdeps= $ui->get_module_departments("users"); $ids = $this->config->idepartments; -print_a($ids); $first = ""; $found = FALSE; - foreach($deps as $dep){ - if(isset($ids[$dep['dn']]) && in_array_ics($dep['dn'], $tdeps)){ + foreach($ids as $dep => $name){ + if(isset($deps[$dep]) && in_array_ics($dep, $tdeps)){ /* Keep first base dn in mind, we could need this * info if no valid base was found @@ -110,12 +116,12 @@ print_a($ids); $first = $dep['dn']; } - $value = $ids[$dep['dn']]; - if ($this->selectedBase == $dep['dn']){ + $value = $ids[$dep]; + if ($this->selectedBase == $dep){ $found = TRUE; - $options.= ""; + $options.= ""; } else { - $options.= ""; + $options.= ""; } } } -- 2.30.2