Code

Fixed remove
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 27 May 2008 13:41:09 +0000 (13:41 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 27 May 2008 13:41:09 +0000 (13:41 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11046 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/admin/users/class_userManagement.inc

index b4dee990b86d7c9c37cf3fdb63b7e40afd4cd7ef..a038f933346ecf43d5eb3461ec16fabe6352e819 100644 (file)
@@ -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)));
+        }
       }
     }