summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8e1f260)
raw | patch | inline | side by side (parent: 8e1f260)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 21 May 2007 12:47:47 +0000 (12:47 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 21 May 2007 12:47:47 +0000 (12:47 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6424 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/users/class_divListUsers.inc | patch | blob | history |
diff --git a/plugins/admin/users/class_divListUsers.inc b/plugins/admin/users/class_divListUsers.inc
index cca776319ca553a5d948737d5c0690adbebce6a5..c73fe97aa866e3f246a236a392a156cc1227761b 100644 (file)
$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
$first = $dep['dn'];
}
- $value = $ids[$dep['dn']];
- if ($this->selectedBase == $dep['dn']){
+ $value = $ids[$dep];
+ if ($this->selectedBase == $dep){
$found = TRUE;
- $options.= "<option selected='selected' value='".$dep['dn']."'>$value</option>";
+ $options.= "<option selected='selected' value='".$dep."'>$value</option>";
} else {
- $options.= "<option value='".$dep['dn']."'>$value</option>";
+ $options.= "<option value='".$dep."'>$value</option>";
}
}
}