summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3787622)
raw | patch | inline | side by side (parent: 3787622)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 19 Jun 2008 11:22:16 +0000 (11:22 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 19 Jun 2008 11:22:16 +0000 (11:22 +0000) |
-Departments were only listed if we have full access.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11372 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11372 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/mimetypes/class_divListMimeTypes.inc | patch | blob | history |
diff --git a/gosa-plugins/goto/admin/mimetypes/class_divListMimeTypes.inc b/gosa-plugins/goto/admin/mimetypes/class_divListMimeTypes.inc
index b324a8a8349e9874e278d4422ec928bb3b0d978b..23c76196c0db4a4666a3a629e0a5fe64d58e8420 100644 (file)
/* Create list header, with create / copy & paste etc*/
function GenHeader()
{
-
-
/* Add default header */
$listhead = MultiSelectWindow::get_default_header(false);
if(!$this->parent->IsReleaseManagementActivated()){
- /* Prepare departments,
- which are shown in the listbox on top of the listbox
- */
- $options= "";
-
/* Get all departments within this subtree */
$ui= get_userinfo();
$first = "";
$found = FALSE;
$base = $this->config->current['BASE'];
-
- /* Add 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($this->module);
- $ids = $this->config->idepartments;
- $first = "";
- $found = FALSE;
- 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
- */
- if(empty($first)) {
- $first = $dep['dn'];
- }
-
- $value = $ids[$dep];
- if ($this->selectedBase == $dep){
- $found = TRUE;
- $options.= "<option selected='selected' value='".$dep."'>$value</option>";
- } else {
- $options.= "<option value='".$dep."'>$value</option>";
- }
- }
- }
-
- /* The currently used base is not visible with your acl setup.
- * Set base to first useable base.
- */
- if(!$found){
- $this->selectedBase = $first;
- }
+ $options = $this->create_department_list($this->module);
/* And at least add a department selection box */
$listhead .= _("Base")." <select name='CurrentMainBase' onChange='mainform.submit()' class='center'>$options</select>".