From 22037c08183222574c8872d3adb2de030dd655af Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 27 May 2008 13:41:09 +0000 Subject: [PATCH] Fixed remove git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11046 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../admin/users/class_userManagement.inc | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/gosa-core/plugins/admin/users/class_userManagement.inc b/gosa-core/plugins/admin/users/class_userManagement.inc index b4dee990b..a038f9333 100644 --- a/gosa-core/plugins/admin/users/class_userManagement.inc +++ b/gosa-core/plugins/admin/users/class_userManagement.inc @@ -582,24 +582,27 @@ class userManagement extends plugin msg_dialog::display(_("Permission"),msgPool::permDelete($disallowed),INFO_DIALOG); } - /* Check locks */ - if ($user= get_multiple_locks($this->dns)){ - return(gen_locked_message($user,$this->dns)); - } + if(count($this->dns)){ - $dns_names = array(); - foreach($this->dns as $dn){ - $dns_names[] = @LDAP::fix($dn); - } + /* Check locks */ + if ($user= get_multiple_locks($this->dns)){ + return(gen_locked_message($user,$this->dns)); + } - add_lock($this->dns, $this->ui->dn); + $dns_names = array(); + foreach($this->dns as $dn){ + $dns_names[] = @LDAP::fix($dn); + } + + add_lock($this->dns, $this->ui->dn); - /* Lock the current entry, so nobody will edit it during deletion */ - $info = sprintf(msgPool::deleteInfo($dns_names,_("user"))); + /* Lock the current entry, so nobody will edit it during deletion */ + $info = sprintf(msgPool::deleteInfo($dns_names,_("user"))); - /* Lock the current entry, so nobody will edit it during deletion */ - $smarty->assign("info", msgPool::deleteInfo($dns_names)); - return($smarty->fetch(get_template_path('remove.tpl', TRUE))); + /* Lock the current entry, so nobody will edit it during deletion */ + $smarty->assign("info", msgPool::deleteInfo($dns_names)); + return($smarty->fetch(get_template_path('remove.tpl', TRUE))); + } } } -- 2.30.2