X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fadmin%2Fdepartments%2Fclass_departmentManagement.inc;h=2a1e2e523a85bdc5efbe9d061dff3a96d6cc2b7f;hb=68c8306203abd7ee288216ceed2c085ff3bf90ee;hp=fa2aa3bda03ec4d7b6f0edf6dc877d5a12890242;hpb=bf70914688502c7abee5f0625158d6a47b37de96;p=gosa.git diff --git a/plugins/admin/departments/class_departmentManagement.inc b/plugins/admin/departments/class_departmentManagement.inc index fa2aa3bda..2a1e2e523 100644 --- a/plugins/admin/departments/class_departmentManagement.inc +++ b/plugins/admin/departments/class_departmentManagement.inc @@ -142,12 +142,9 @@ class departmentManagement extends plugin /* New Entry if Posted action (s_action) == new */ if ($s_action=="new"){ - $this->acl= array(":all"); $this->dn= "new"; - $this->deptabs= new deptabs($this->config, $this->config->data['TABS']['DEPTABS'], $this->dn); - $this->deptabs->set_acl($this->acl); } /* Edit Entry if Posted action (s_action) == edit @@ -185,7 +182,7 @@ class departmentManagement extends plugin return(gen_locked_message($user, $this->dn)); } else { add_lock ($this->dn, $this->ui->dn); - $smarty->assign("info", sprintf(_("You're about to delete the whole LDAP subtree placed under '%s'."), $this->dn)); + $smarty->assign("info", sprintf(_("You're about to delete the whole LDAP subtree placed under '%s'."), LDAP::fix($this->dn))); $display.= $smarty->fetch (get_template_path('remove.tpl', TRUE)); return ($display); } @@ -197,7 +194,7 @@ class departmentManagement extends plugin if (isset($_POST['delete_department_confirm'])){ $acl= get_permissions ($this->dn, $this->ui->subtreeACL); $acl= get_module_permission($acl, "department", $this->dn); - if (chkacl($acl, "all") == ""){ + if (chkacl($acl, "delete") == ""){ $this->remove_from_parent(); gosa_log ("Department object'".$this->dn."' has been removed"); $this->reload (); @@ -277,22 +274,22 @@ class departmentManagement extends plugin /* Generate list head */ $listhead = "
". - "  ". - "  ". - "  ". - "  ". - "  ". - "  ". - _("Current base")." ". - "  ". + "  ". + "  ". + "  ". + "  ". + "  ". + "  ". + _("Base")." ". + "  ". "
"; /* Show main page */ $divlist = new divlist("departmenttabs"); $divlist->SetSummary(_("This table displays all departments, in the selected tree.")); $divlist->SetEntriesPerPage(0); - $actions= ""; - $actions.= ""; + $actions= ""; + $actions.= ""; $linkopen = "%s"; @@ -409,14 +406,17 @@ class departmentManagement extends plugin $this->departments= array(); foreach ($res as $value){ - if($value["description"][0]!=".."){ + if(isset($value["description"][0])){ $this->departments[$value['dn']]= convert_department_dn2($value['dn'])." - [".$value["description"][0]."]"; }else{ - $this->departments[$value['dn']]=$value["description"][0]; + $this->departments[$value['dn']]= convert_department_dn2($value['dn']);//$value["description"][0]; } } natcasesort ($this->departments); reset ($this->departments); + + /* Unset global department list */ + unset($_SESSION['cached_departments']); } function remove_from_parent()