X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fadmin%2Fdepartments%2Fclass_departmentManagement.inc;h=2a1e2e523a85bdc5efbe9d061dff3a96d6cc2b7f;hb=68c8306203abd7ee288216ceed2c085ff3bf90ee;hp=cbfef6f7d23e4f723026041912d01d687572e91c;hpb=ba56bbc4d5fa988702f40cd94a7206f0507c647c;p=gosa.git diff --git a/plugins/admin/departments/class_departmentManagement.inc b/plugins/admin/departments/class_departmentManagement.inc index cbfef6f7d..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(); @@ -76,13 +79,13 @@ class departmentManagement extends plugin if(preg_match("/dep_del.*/",$key)){ $s_action = "del"; $s_entry = preg_replace("/dep_".$s_action."_/i","",$key); - $s_entry = preg_replace("/_.*/","",$s_entry); + $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 = preg_replace("/_.*$/","",$s_entry); $s_entry = base64_decode($s_entry); // Post for new }elseif(preg_match("/dep_new.*/",$key)){ @@ -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 = "