summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9fde63b)
raw | patch | inline | side by side (parent: 9fde63b)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 26 Jun 2008 11:24:53 +0000 (11:24 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 26 Jun 2008 11:24:53 +0000 (11:24 +0000) |
-Changed delete method from remove to rmdir_recursive.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11455 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11455 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/plugins/admin/departments/class_departmentGeneric.inc | patch | blob | history | |
gosa-core/plugins/admin/departments/class_departmentManagement.inc | patch | blob | history |
diff --git a/gosa-core/plugins/admin/departments/class_departmentGeneric.inc b/gosa-core/plugins/admin/departments/class_departmentGeneric.inc
index 45b5a52bed9c68f7d674ab1e47e6a1c665b3a86e..8b04650e2df8779b61e3edaf18be38fc3da5a4d2 100644 (file)
{
$ldap= $this->config->get_ldap_link();
$ldap->cd ($this->dn);
- $ldap->recursive_remove();
+ $ldap->rmdir_recursive($this->dn);
new log("remove","department/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
if (!$ldap->success()){
msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_DEL, get_class()));
diff --git a/gosa-core/plugins/admin/departments/class_departmentManagement.inc b/gosa-core/plugins/admin/departments/class_departmentManagement.inc
index 713b37c21e1ffe5614f868d093b178af84c1a230..b2ef6df435f42b8bf386aa42c624fe4d565079a1 100644 (file)
Delete MULTIPLE entries requested, display confirm dialog
********************/
- if ($s_action=="del_multiple"){
- $ids = $this->list_get_selected_items();
+ if ($s_action=="del_multiple" || $s_action == "del"){
+
+ if($s_action == "del"){
+ $ids = array($s_entry);
+ }else{
+ $ids = $this->list_get_selected_items();
+ }
if(count($ids)){
$this->dns = array();
}
- /***************
- Delete entry
- ***************/
-
- /* Delete Entry if Posted action (s_action) == del
- * The entry which will be deleted is defined in $s_entry
- */
- if ($s_action =="del"){
- $this->dn= $this->config->departments[trim($s_entry)];
-
- /* check acls */
- $acl = $this->ui->get_permissions($this->dn,"department/department");
- if(preg_match("/d/",$acl)){
-
- /* Check locking */
- if (($user= get_lock($this->dn)) != ""){
- session::set('dn',$this->dn);
- 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'."), @LDAP::fix($this->dn)));
- $smarty->assign("multiple", false);
- $display.= $smarty->fetch (get_template_path('remove.tpl', TRUE));
- return ($display);
- }
- }else{
- msg_dialog::display(_("Permission error"), msgPool::permDelete(), WARNING_DIALOG);
- }
- }
-
-
- /***************
- Delete department confirmed
- ***************/
-
- /* If department deletion is accepted ...
- * Finally delete department
- */
- if (isset($_POST['delete_department_confirm'])){
-
- /* check acls */
- $acl = $this->ui->get_permissions($this->dn,"department/department");
- if(preg_match("/d/",$acl)){
- $this->remove_from_parent();
- } else {
- msg_dialog::display(_("Permission error"), msgPool::permDelete(), WARNING_DIALOG);
- }
- }
-
-
/***************
Handle tagging/recursive move (Return output for an iframe)
***************/