X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fadmin%2Fdepartments%2Fclass_departmentManagement.inc;h=2a1e2e523a85bdc5efbe9d061dff3a96d6cc2b7f;hb=68c8306203abd7ee288216ceed2c085ff3bf90ee;hp=67c6ca84cc7be6f63a1869fd1c1181b2693ea9dd;hpb=9a06dfe9233c6e7c80b49ccddf9a23355db2df51;p=gosa.git diff --git a/plugins/admin/departments/class_departmentManagement.inc b/plugins/admin/departments/class_departmentManagement.inc index 67c6ca84c..2a1e2e523 100644 --- a/plugins/admin/departments/class_departmentManagement.inc +++ b/plugins/admin/departments/class_departmentManagement.inc @@ -56,6 +56,9 @@ class departmentManagement extends plugin function execute() { + /* Call parent execute */ + plugin::execute(); + /* Reload departments */ $this->config->departments = get_departments(); $smarty = get_smarty(); @@ -99,18 +102,15 @@ class departmentManagement extends plugin if(isset($_POST['depselect']) && $_POST['depselect']){ $depfilter['depselect']= $_POST['depselect']; - $this->reload(); } if($s_action=="root"){ $depfilter['depselect']=($this->config->current['BASE']); - $this->reload(); } if($s_action=="home"){ $depfilter['depselect']=(preg_replace("/^[^,]+,/","",$this->ui->dn)); $depfilter['depselect']=(preg_replace("/^[^,]+,/","",$depfilter['depselect'])); - $this->reload(); } if($s_action=="back"){ @@ -122,14 +122,12 @@ class departmentManagement extends plugin }else{ $depfilter['depselect']= $this->config->departments["/"]; } - $this->reload(); } if(isset($_GET['act'])&&($_GET['act']=="dep_open")){ $s_action="open"; $s_entry = base64_decode($_GET['dep_id']); $depfilter['depselect']= $this->config->departments[trim($s_entry)]; - $this->reload(); } if (isset($_GET['search'])){ @@ -144,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 @@ -187,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); } @@ -199,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 (); @@ -279,36 +274,47 @@ class departmentManagement extends plugin /* Generate list head */ $listhead = "