From b02f1a5b200b8328c6366d47ac953428308b31c1 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 8 Jan 2008 11:34:08 +0000 Subject: [PATCH] Prepared groups for multiple edit. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8247 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../admin/groups/class_divListGroup.inc | 2 ++ .../plugins/admin/groups/class_groupMail.inc | 2 +- .../admin/groups/class_groupManagement.inc | 30 +++++++++++++++++-- 3 files changed, 31 insertions(+), 3 deletions(-) diff --git a/gosa-core/plugins/admin/groups/class_divListGroup.inc b/gosa-core/plugins/admin/groups/class_divListGroup.inc index fcf32f843..f9acd3b86 100644 --- a/gosa-core/plugins/admin/groups/class_divListGroup.inc +++ b/gosa-core/plugins/admin/groups/class_divListGroup.inc @@ -167,6 +167,8 @@ class divListGroup extends MultiSelectWindow /* Multiple options */ $s.= "..|---|\n"; + $s.= "..|". + " "._("Edit")."|"."multiple_edit|\n"; $s.= "..|". " "._("Remove")."|"."remove_multiple|\n"; diff --git a/gosa-core/plugins/admin/groups/class_groupMail.inc b/gosa-core/plugins/admin/groups/class_groupMail.inc index 7d65c74ac..021fffbcc 100644 --- a/gosa-core/plugins/admin/groups/class_groupMail.inc +++ b/gosa-core/plugins/admin/groups/class_groupMail.inc @@ -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... */ diff --git a/gosa-core/plugins/admin/groups/class_groupManagement.inc b/gosa-core/plugins/admin/groups/class_groupManagement.inc index 7802c8559..05828222e 100644 --- a/gosa-core/plugins/admin/groups/class_groupManagement.inc +++ b/gosa-core/plugins/admin/groups/class_groupManagement.inc @@ -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 ********************/ -- 2.30.2