Code

Prepared groups for multiple edit.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 8 Jan 2008 11:34:08 +0000 (11:34 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 8 Jan 2008 11:34:08 +0000 (11:34 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8247 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/admin/groups/class_divListGroup.inc
gosa-core/plugins/admin/groups/class_groupMail.inc
gosa-core/plugins/admin/groups/class_groupManagement.inc

index fcf32f84391f8ef4e8c884453ed927029a8468c2..f9acd3b8631dd6915830421d322747481ff61649 100644 (file)
@@ -167,6 +167,8 @@ class divListGroup extends MultiSelectWindow
 
     /* Multiple options */
     $s.= "..|---|\n";
+    $s.= "..|<img src='images/edit.png' alt='' border='0' class='center'>".
+      "&nbsp;"._("Edit")."|"."multiple_edit|\n";
     $s.= "..|<img src='images/edittrash.png' alt='' border='0' class='center'>".
       "&nbsp;"._("Remove")."|"."remove_multiple|\n";
 
index 7d65c74acb7714aabef315dd28fcc3f5e317ec10..021fffbcc193d656f358a80fdcd5bc0b30e7fb21 100644 (file)
@@ -132,7 +132,7 @@ class mailgroup extends plugin
              read imap the acls from the mail method class.
              They will be merged later with the ldap specified acls.
            */
-          if(!preg_match("/olab/i",$this->mmethod)){
+          if(!preg_match("/olab/i",$this->mmethod) && !empty($this->mmethod)){
             $this->imapacl=  $method->getSharedFolderPermissions($this->uid);
 
             /* Need to filter what a member acl could be... */
index 7802c8559701ef0a2a2b38259934904df1383773..05828222e5f73a0968e33fd78f02314b5cb323f5 100644 (file)
@@ -67,7 +67,7 @@ class groupManagement extends plugin
        plugin::execute();
 
     /* Store these posts if the current object is locked (used by somebody else)*/
-    session::set('LOCK_VARS_TO_USE',array("/^act$/","/^id$/","/^group_edit_/","/^group_del_/","/^item_selected/","/^remove_multiple_groups/"));
+    session::set('LOCK_VARS_TO_USE',array("/^act$/","/^id$/","/^group_edit_/","/^group_del_/","/^item_selected/","/^remove_multiple_groups/","/^multiple_edit/","/menu_action/"));
 
     /* Save data */
     $s_action   = "";
@@ -142,7 +142,9 @@ class groupManagement extends plugin
     if(isset($_POST['menu_action']) && preg_match("/^remove_multiple/",$_POST['menu_action'])){
       $s_action = "del_multiple";
     }
-
+    if(isset($_POST['menu_action']) && $_POST['menu_action'] == "multiple_edit"){
+      $s_action = "multiple_edit";
+    }
 
 
     $smarty= get_smarty();
@@ -219,6 +221,30 @@ class groupManagement extends plugin
     }
 
 
+    /********************
+      Edit multiple entries
+     ********************/
+
+    /* User wants to edit data? */
+    if ($s_action == "multiple_edit" && !isset($this->grouptab->config)){
+
+      $this->dn = array();
+      foreach($this->list_get_selected_items() as $id){
+        $this->dn[] = $this->grouplist[$id]['dn'];;
+      }
+      $tmp = new multi_plug($this->config,"grouptabs",$this->config->data['TABS']['GROUPTABS'],
+            $this->dn,$this->DivListGroup->selectedBase,"groups");
+      if ($tmp->entries_locked()){
+        return($tmp->display_lock_message());
+      }
+      $tmp->lock_entries($this->ui->dn);
+      if($tmp->multiple_available()){
+        $this->usertab = $tmp;
+        session::set('objectinfo',$this->usertab->get_object_info());
+      }
+    }
+
+
     /********************
       Edit existing group 
      ********************/