From 31391b14b591c509c22807a26f3563404aceb9df Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 3 May 2007 08:58:02 +0000 Subject: [PATCH] Updated divlists. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6244 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../applications/class_divListApplication.inc | 19 ++++++++++++++++++- .../departments/class_divListDepartment.inc | 1 + plugins/admin/fai/class_divListFai.inc | 1 + plugins/admin/groups/class_divListGroup.inc | 1 + .../mimetypes/class_divListMimeTypes.inc | 1 + plugins/admin/ogroups/class_divListOGroup.inc | 1 + plugins/admin/systems/class_divListSystem.inc | 1 + .../blocklists/class_divListBlocklists.inc | 1 + .../conference/class_divListConferences.inc | 1 + plugins/gofon/macro/class_divListMacros.inc | 1 + 10 files changed, 27 insertions(+), 1 deletion(-) diff --git a/plugins/admin/applications/class_divListApplication.inc b/plugins/admin/applications/class_divListApplication.inc index 77e82f125..71ef2ad71 100755 --- a/plugins/admin/applications/class_divListApplication.inc +++ b/plugins/admin/applications/class_divListApplication.inc @@ -95,14 +95,24 @@ class divListApplication extends MultiSelectWindow /* Load possible departments */ $ui= get_userinfo(); $tdeps= $ui->get_module_departments("application"); - + $first = ""; + $found = FALSE; $ids = $this->config->idepartments; foreach($deps as $dep){ if(isset($ids[$dep['dn']]) && in_array_ics($dep['dn'], $tdeps)){ $value = $ids[$dep['dn']]; + + /* Keep first base dn in mind, we could need this + * info if no valid base was found + */ + if(empty($first)) { + $first = $dep['dn']; + } + if ($this->selectedBase == $dep['dn']){ + $found = TRUE; $options.= ""; } else { $options.= ""; @@ -110,6 +120,13 @@ class divListApplication extends MultiSelectWindow } } + /* The currently used base is not visible with your acl setup. + * Set base to first useable base. + */ + if(!$found){ + $this->selectedBase = $first; + } + /* Get acls */ $ui = get_userinfo(); $acl = $ui->get_permissions("cn=dummy,".$this->selectedBase,"application/application"); diff --git a/plugins/admin/departments/class_divListDepartment.inc b/plugins/admin/departments/class_divListDepartment.inc index a5a0762bf..d1107a570 100755 --- a/plugins/admin/departments/class_divListDepartment.inc +++ b/plugins/admin/departments/class_divListDepartment.inc @@ -93,6 +93,7 @@ class divListDepartment extends MultiSelectWindow $value = $ids[$dep['dn']]; if ($this->selectedBase == $dep['dn']){ + $found = TRUE; $options.= ""; } else { $options.= ""; diff --git a/plugins/admin/fai/class_divListFai.inc b/plugins/admin/fai/class_divListFai.inc index 5fbd58d4b..122f08912 100644 --- a/plugins/admin/fai/class_divListFai.inc +++ b/plugins/admin/fai/class_divListFai.inc @@ -132,6 +132,7 @@ class divListFai extends MultiSelectWindow $value = $ids[$dep['dn']]; if ($this->selectedBase == $dep['dn']){ + $found = TRUE; $options.= ""; } else { $options.= ""; diff --git a/plugins/admin/groups/class_divListGroup.inc b/plugins/admin/groups/class_divListGroup.inc index 9b1802474..8e31b350d 100644 --- a/plugins/admin/groups/class_divListGroup.inc +++ b/plugins/admin/groups/class_divListGroup.inc @@ -116,6 +116,7 @@ class divListGroup extends MultiSelectWindow $value = $ids[$dep['dn']]; if ($this->selectedBase == $dep['dn']){ + $found = TRUE; $options.= ""; } else { $options.= ""; diff --git a/plugins/admin/mimetypes/class_divListMimeTypes.inc b/plugins/admin/mimetypes/class_divListMimeTypes.inc index 0d961ba4b..ce907fa3b 100755 --- a/plugins/admin/mimetypes/class_divListMimeTypes.inc +++ b/plugins/admin/mimetypes/class_divListMimeTypes.inc @@ -120,6 +120,7 @@ class divListMimeTypes extends MultiSelectWindow $value = $ids[$dep['dn']]; if ($this->selectedBase == $dep['dn']){ + $found = TRUE; $options.= ""; } else { $options.= ""; diff --git a/plugins/admin/ogroups/class_divListOGroup.inc b/plugins/admin/ogroups/class_divListOGroup.inc index 959dfaab7..7b4e81e67 100755 --- a/plugins/admin/ogroups/class_divListOGroup.inc +++ b/plugins/admin/ogroups/class_divListOGroup.inc @@ -120,6 +120,7 @@ class divListOGroup extends MultiSelectWindow $value = $ids[$dep['dn']]; if ($this->selectedBase == $dep['dn']){ + $found = TRUE; $options.= ""; } else { $options.= ""; diff --git a/plugins/admin/systems/class_divListSystem.inc b/plugins/admin/systems/class_divListSystem.inc index 72870d701..882805955 100644 --- a/plugins/admin/systems/class_divListSystem.inc +++ b/plugins/admin/systems/class_divListSystem.inc @@ -133,6 +133,7 @@ class divListSystem extends MultiSelectWindow $value = $ids[$dep['dn']]; if ($this->selectedBase == $dep['dn']){ + $found = TRUE; $options.= ""; } else { $options.= ""; diff --git a/plugins/gofax/blocklists/class_divListBlocklists.inc b/plugins/gofax/blocklists/class_divListBlocklists.inc index 58722ecb9..42bd1f549 100755 --- a/plugins/gofax/blocklists/class_divListBlocklists.inc +++ b/plugins/gofax/blocklists/class_divListBlocklists.inc @@ -102,6 +102,7 @@ class divListBlocklist extends MultiSelectWindow $value = $ids[$dep['dn']]; if ($this->selectedBase == $dep['dn']){ + $found = TRUE; $options.= ""; } else { $options.= ""; diff --git a/plugins/gofon/conference/class_divListConferences.inc b/plugins/gofon/conference/class_divListConferences.inc index 0dfd3dc80..aeb111f78 100755 --- a/plugins/gofon/conference/class_divListConferences.inc +++ b/plugins/gofon/conference/class_divListConferences.inc @@ -101,6 +101,7 @@ class divListConference extends MultiSelectWindow $value = $ids[$dep['dn']]; if ($this->selectedBase == $dep['dn']){ + $found = TRUE; $options.= ""; } else { $options.= ""; diff --git a/plugins/gofon/macro/class_divListMacros.inc b/plugins/gofon/macro/class_divListMacros.inc index 0e3600bd4..f3c13d969 100755 --- a/plugins/gofon/macro/class_divListMacros.inc +++ b/plugins/gofon/macro/class_divListMacros.inc @@ -101,6 +101,7 @@ class divListMacro extends MultiSelectWindow $value = $ids[$dep['dn']]; if ($this->selectedBase == $dep['dn']){ $options.= ""; + $found = TRUE; } else { $options.= ""; } -- 2.30.2