Code

Updated locking for multiple edit
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 7 Dec 2007 13:57:42 +0000 (13:57 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 7 Dec 2007 13:57:42 +0000 (13:57 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8060 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_multi_plug.inc
plugins/admin/users/class_userManagement.inc

index e1bd7ce8ff698f2fe27a421564064bbc4fcf83b7..b0b6abdb61119621565c1f1d6ce8f0aae092ef36 100644 (file)
@@ -126,6 +126,12 @@ class multi_plug
    */
   public function entries_locked()
   {
+    $ui = get_userinfo();
+    foreach($this->dn as $dn){
+      if(get_lock($dn) != ""){
+        return(TRUE);
+      }
+    }
     return(FALSE);
   }
 
@@ -135,7 +141,10 @@ class multi_plug
    */
   public function display_lock_message()
   {
-    return("sdf");
+    $ui = get_userinfo();
+    $lock_msg = "";
+    $lock_msg.=  gen_locked_message ($ui->dn, $this->dn);
+    return($lock_msg);
   }
 
 
@@ -170,7 +179,7 @@ class multi_plug
    */
   public function get_object_info()
   {
-    return("Oi -----");
+    return(_("You are currently editing mutliple entries."));
   }
 
 
@@ -234,7 +243,7 @@ class multi_plug
     if($this->multiple_available() && is_array($this->a_handles)){
       $this->populate_values();
       foreach($this->a_handles as $i_id => $o_handle){
-        $o_handle->save(TRUE);
+        $o_handle->save();
       }
     }
   }
index a2f6f70a22941417edf4d8140db44073a5a662ad..a031e89d9f783a2cbb19272ea867938b1bde2c65 100644 (file)
@@ -62,7 +62,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_users/","/^multiple_edit/");
+    $_SESSION['LOCK_VARS_TO_USE'] = array("/^act$/","/^id$/","/^user_edit_/","/^user_del_/","/^item_selected/","/^remove_multiple_users/","/^multiple_edit/","/menu_action/");
 
     $smarty       = get_smarty();                 // Smarty instance
     $s_action     = "";                           // Contains the action to be taken