Code

Added some logging
[gosa.git] / plugins / admin / users / class_userManagement.inc
index 9d24b558f2996da673e45c9a726be3b3c04f88ad..d11e22d654f7f57f63139e151413e461c0e37e69 100644 (file)
@@ -60,7 +60,7 @@ class userManagement extends plugin
     plugin::execute();
 
     /* LOCK MESSAGE Vars */
-    $_SESSION['LOCK_VARS_TO_USE'] = array("/^act$/","/^id$/","/^user_edit_/","/^user_del_/","/^item_selected/","/^remove_multiple_user/");
+    $_SESSION['LOCK_VARS_TO_USE'] = array("/^act$/","/^id$/","/^user_edit_/","/^user_del_/","/^item_selected/","/^remove_multiple_users/");
 
     $smarty       = get_smarty();                 // Smarty instance
     $s_action     = "";                           // Contains the action to be taken
@@ -79,7 +79,7 @@ class userManagement extends plugin
       foreach(array("del"       => "user_del",    "edit"      => "user_edit",
                     "new"       => "user_new",
                     "new_tpl"   => "user_tplnew",
-                    "del_multiple" => "^remove_multiple_user",
+                    "del_multiple" => "^remove_multiple_users",
                     "create_user_from_tpl"          => "userfrom_tpl",
                     "change_pw" => "user_chgpw", 
                     "editPaste" => "editPaste",   "copy"      => "copy",
@@ -305,8 +305,6 @@ class userManagement extends plugin
           $this->dns[$id] = $dn; 
         }
 
-
-
         $dns_names = "<br><pre>";
         foreach($this->dns as $dn){
           add_lock ($dn, $this->ui->dn);
@@ -315,7 +313,11 @@ class userManagement extends plugin
         $dns_names .="</pre>";
 
         /* Lock the current entry, so nobody will edit it during deletion */
-        $smarty->assign("info",     sprintf(_("You're about to delete the following user(s) %s"), @LDAP::fix($dns_names)));
+        if (count($this->dns) == 1){
+          $smarty->assign("info",     sprintf(_("You're about to delete the following entry: %s"), @LDAP::fix($dns_names)));
+        } else {
+          $smarty->assign("info",     sprintf(_("You're about to delete the following entries: %s"), @LDAP::fix($dns_names)));
+        }
         $smarty->assign("multiple", true);
         return($smarty->fetch(get_template_path('remove.tpl', TRUE)));
       }