summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 997222b)
raw | patch | inline | side by side (parent: 997222b)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 24 Oct 2006 07:45:43 +0000 (07:45 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 24 Oct 2006 07:45:43 +0000 (07:45 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4923 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/plugins/admin/applications/class_divListApplication.inc b/plugins/admin/applications/class_divListApplication.inc
index 204a9a7dd66040d46ef2a3bd1a40dd3cf079f097..29745ad82390aaafa1cd6fa98b88122c2b7c2a07 100755 (executable)
{
/* Prepare departments,
which are shown in the listbox on top of the listbox
- */
+ */
$options= "";
- foreach ($this->config->idepartments as $key => $value){
- if ($this->selectedBase == $key){
- $options.= "<option selected='selected' value='$key'>$value</option>";
- } else {
- $options.= "<option value='$key'>$value</option>";
+
+ /* 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 | GL_SUBSEARCH);
+
+ /* Load possible departments */
+ $ui= get_userinfo();
+ $tdeps= $ui->get_module_departments("application");
+
+ $ids = $this->config->idepartments;
+
+ foreach($deps as $dep){
+ if(isset($ids[$dep['dn']]) && in_array_ics($dep['dn'], $tdeps)){
+
+ $value = $ids[$dep['dn']];
+ if ($this->selectedBase == $dep['dn']){
+ $options.= "<option selected='selected' value='".$dep['dn']."'>$value</option>";
+ } else {
+ $options.= "<option value='".$dep['dn']."'>$value</option>";
+ }
}
}
diff --git a/plugins/admin/departments/class_divListDepartment.inc b/plugins/admin/departments/class_divListDepartment.inc
index 714570fd6978c769b7925ddd2951870ab18f5f31..7ea33e77518d3c22c64363495e2268cea1fed25c 100755 (executable)
{
/* Prepare departments,
which are shown in the listbox on top of the listbox
- */
+ */
$options= "";
- foreach ($this->config->idepartments as $key => $value){
- if ($this->selectedBase == $key){
- $options.= "<option selected='selected' value='$key'>$value</option>";
- } else {
- $options.= "<option value='$key'>$value</option>";
+
+ /* 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 | GL_SUBSEARCH);
+
+ /* Load possible departments */
+ $ui= get_userinfo();
+ $tdeps= $ui->get_module_departments("department");
+
+ $ids = $this->config->idepartments;
+
+ foreach($deps as $dep){
+ if(isset($ids[$dep['dn']]) && in_array_ics($dep['dn'], $tdeps)){
+
+ $value = $ids[$dep['dn']];
+ if ($this->selectedBase == $dep['dn']){
+ $options.= "<option selected='selected' value='".$dep['dn']."'>$value</option>";
+ } else {
+ $options.= "<option value='".$dep['dn']."'>$value</option>";
+ }
}
}
+
/* Generate list head */
$ui = get_userinfo();
$acl = $ui->get_permissions("ou=dummy,".$this->selectedBase ,"department/department");
diff --git a/plugins/admin/mimetypes/class_divListMimeTypes.inc b/plugins/admin/mimetypes/class_divListMimeTypes.inc
index 0914cf8190d2aa9f4f1b074eca67a41dca7acab2..d48ad362527e599be279fa7b78c07ce7dd62ba35 100755 (executable)
which are shown in the listbox on top of the listbox
*/
$options= "";
- foreach ($this->config->idepartments as $key => $value){
- if ($this->selectedBase == $key){
- $options.= "<option selected='selected' value='$key'>$value</option>";
- } else {
- $options.= "<option value='$key'>$value</option>";
+
+ /* 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 | GL_SUBSEARCH);
+
+ /* Load possible departments */
+ $ui= get_userinfo();
+ $tdeps= $ui->get_module_departments("fai");
+
+ $ids = $this->config->idepartments;
+
+ foreach($deps as $dep){
+ if(isset($ids[$dep['dn']]) && in_array_ics($dep['dn'], $tdeps)){
+
+ $value = $ids[$dep['dn']];
+ if ($this->selectedBase == $dep['dn']){
+ $options.= "<option selected='selected' value='".$dep['dn']."'>$value</option>";
+ } else {
+ $options.= "<option value='".$dep['dn']."'>$value</option>";
+ }
}
}