From 3a463593db907d6d32856012bcf62e0919439043 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 19 Jun 2008 11:21:49 +0000 Subject: [PATCH] Updated Listing for serveral Management lists. -Departments were only listed if we have full access. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11369 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../admin/devices/class_divListDevices.inc | 50 +------------------ 1 file changed, 1 insertion(+), 49 deletions(-) diff --git a/gosa-plugins/goto/admin/devices/class_divListDevices.inc b/gosa-plugins/goto/admin/devices/class_divListDevices.inc index 181545c3e..0202e9d6e 100644 --- a/gosa-plugins/goto/admin/devices/class_divListDevices.inc +++ b/gosa-plugins/goto/admin/devices/class_divListDevices.inc @@ -62,60 +62,12 @@ class divListDevices extends MultiSelectWindow /* Create list header, with create / copy & paste etc*/ function GenHeader() { - /* 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.= ""; - } else { - $options.= ""; - } - } - } - - /* 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); /* Get acls */ $ui = get_userinfo(); -- 2.30.2