diff --git a/trunk/gosa-plugins/goto/admin/ogroups/goto/class_termgroup.inc b/trunk/gosa-plugins/goto/admin/ogroups/goto/class_termgroup.inc
index c8072711949ab4eebde08e95445c36b8174b48d3..bc8149be53f05ccbd33fd092911196686b5f5b61 100644 (file)
var $nfsservers = array();
var $swapservers = array();
var $member_of_ogroup= false;
- var $members_inherit_from_group = true;
+ var $inherit_confirmation;
function termgroup (&$config, $dn= NULL, $parent= NULL)
{
/* Handle the inherit to members button */
if (isset($_POST['inheritToMembers'])) {
- $this->members_inherit_from_group = true;
+ $this->inherit_confirmation = new msg_dialog(_("Pass on attributs to all members"), _("This action will overwrite all values in the member objects by the values specified in this object group. Do you want to oproceed??"),CONFIRM_DIALOG);
+ }
+
+ if (is_object($this->inherit_confirmation) && ($this->inherit_confirmation->is_confirmed())) {
+ $this->pass_attributes_to_members();
}
/* Watch for events */
plugin::save();
- /* Tell members to inherit all attributes if the flag is set */
- $this->inherit_attributes_to_members();
-
/***************
Prepare special vars
***************/
));
}
- function inherit_attributes_to_members()
+ function pass_attributes_to_members()
{
- if ($this->members_inherit_from_group) {
- foreach ($this->member_dn as $dn) {
- $member_obj = new worktabs($this->config, $this->config->data['TABS']['WORKTABS'], $dn, 'workstation/workgeneric');
- $member_obj->by_object['workgeneric']->set_everything_to_inherited();
- $member_obj->save();
- }
+ foreach ($this->member_dn as $dn) {
+ $member_obj = new worktabs($this->config, $this->config->data['TABS']['WORKTABS'], $dn, 'workstation/workgeneric');
+ $member_obj->by_object['workgeneric']->set_everything_to_inherited();
+ $member_obj->save();
}
}