From: hickert Date: Fri, 13 Jun 2008 09:08:20 +0000 (+0000) Subject: Updated department management X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=cf4b5f27064f8fdb7580d79baec00cf0d1ebc552;p=gosa.git Updated department management git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11319 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/plugins/admin/departments/class_departmentManagement.inc b/gosa-core/plugins/admin/departments/class_departmentManagement.inc index 2d84632ef..27f9c5527 100644 --- a/gosa-core/plugins/admin/departments/class_departmentManagement.inc +++ b/gosa-core/plugins/admin/departments/class_departmentManagement.inc @@ -81,13 +81,11 @@ class departmentManagement extends plugin $s_action = "del"; $s_entry = preg_replace("/dep_".$s_action."_/i","",$key); $s_entry = preg_replace("/_.*$/","",$s_entry); - $s_entry = base64_decode($s_entry); // Post for edit }elseif(preg_match("/dep_edit_.*/",$key)){ $s_action="edit"; $s_entry = preg_replace("/dep_".$s_action."_/i","",$key); $s_entry = preg_replace("/_.*$/","",$s_entry); - $s_entry = base64_decode($s_entry); // Post for new }elseif(preg_match("/^remove_multiple_departments/",$key)){ $s_action="del_multiple"; @@ -143,7 +141,7 @@ class departmentManagement extends plugin * The entry which will be edited is defined in $s_entry */ if (( $s_action=="edit") && (!isset($this->deptabs->config))){ - $this->dn= $this->config->departments[trim($s_entry)]; + $this->dn= $this->departments[trim($s_entry)]['dn']; if (($user= get_lock($this->dn)) != ""){ return(gen_locked_message ($user, $this->dn)); @@ -490,13 +488,20 @@ class departmentManagement extends plugin /* In case of a valid back button create entry */ - if(isset($tmp[$base_back])){ - $tmp = array(); - $tmp['dn'] = $base_back; - $tmp['ou'][0] = ".."; - $tmp['objectClass'] = array("organizationalUnit","gosaDepartment"); - $tmp['description'][0] = msgPool::backButton(); - $deps= array_merge(array($tmp),$deps); + if(isset($tmp[$base])){ + $ldap = $this->config->get_ldap_link(); + $ldap->cd($this->config->current['BASE']); + $ldap->cat($base ); + $attr = $ldap->fetch(); + foreach($types as $oc => $type){ + if(in_array($oc,$attr['objectClass'])){ + $attr[$type['ATTR']][0] = "."; + } + } + if(isset($attr['description'])){ + unset($attr['description']); + } + $deps= array_merge(array($attr),$deps); } $this->departments = array_values($deps); diff --git a/gosa-core/plugins/admin/departments/class_divListDepartment.inc b/gosa-core/plugins/admin/departments/class_divListDepartment.inc index 469b0163b..1b4f2e527 100644 --- a/gosa-core/plugins/admin/departments/class_divListDepartment.inc +++ b/gosa-core/plugins/admin/departments/class_divListDepartment.inc @@ -210,6 +210,7 @@ class divListDepartment extends MultiSelectWindow "IMG" => "plugins/departments/images/country.png", "ABBR" => "c"); $types['locality'] = array("ACL" => "locality", "ATTR" => "l", "TITLE" => _("Department"), + "IMG_FULL" => "plugins/departments/images/locality.png", "IMG" => "plugins/departments/images/locality.png", "ABBR" => "l"); $types['organizationalUnit'] = array("ACL" => "department", "ATTR" => "ou", "TITLE" => _("Department"), @@ -217,12 +218,15 @@ class divListDepartment extends MultiSelectWindow "IMG" => "images/lists/folder.png", "ABBR" => "ou"); $types['organization'] = array("ACL" => "organization", "ATTR" => "o", "TITLE" => _("Department"), + "IMG_FULL" => "plugins/departments/images/organization.png", "IMG" => "plugins/departments/images/organization.png", "ABBR" => "o"); $types['Alias??'] = array("ACL" => "alias" , "ATTR" => "alias?", "TITLE" => _("Department"), + "IMG_FULL" => "plugins/departments/images/department_alias.png", "IMG" => "plugins/departments/images/department_alias.png", "ABBR" => "alias"); $types['Referal??'] = array("ACL" => "referal", "ATTR" => "referal?", "TITLE" => _("Department"), + "IMG_FULL" => "plugins/departments/images/department_referal.png", "IMG" => "plugins/departments/images/department_referal.png", "ABBR" => "referal"); $this->departments = $list;