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 889acaf16c1cce3b7e7cb1022f7d6fc48fae3442..cac4ced98e79c4f0f45ef6077566c532bee4be29 100644 (file)
/* attribute list for save action */
var $members= array();
+ /* Stores a list of the member dn's */
+ var $member_dn = array();
+
var $gotoMode = "locked";
var $gotoSyslogServer = "";
var $gotoNtpServer = array();
"reinstall" => "reinstall",
"rescan" => "rescan",
"wake" => "wakeup",
+ "localboot" => "localboot"
# These are currently not supported by the tftp daemon
# "memcheck" => "memcheck",
# "sysinfo" => "sysinfo"
var $nfsservers = array();
var $swapservers = array();
var $member_of_ogroup= false;
-
+ var $inherit_confirmation;
function termgroup (&$config, $dn= NULL, $parent= NULL)
{
if(isset($this->attrs['member'])){
for ($i= 0; $i<$this->attrs['member']['count']; $i++){
$member= $this->attrs['member'][$i];
+ array_push($this->member_dn, $member);
$ldap->cat($member, array('objectClass', 'macAddress', 'cn'));
if ($ldap->success()){
$attrs = $ldap->fetch();
Handle requested action
***************/
+ /* Handle the inherit to members button */
+ if (isset($_POST['inheritToMembers'])) {
+ $this->inherit_confirmation = new msg_dialog(_("Pass on attributes to all members"), _("This action will overwrite all attributes of the group members with the values specified in this object group. Do you want to proceed?"),CONFIRM_DIALOG);
+ }
+
+ if (is_object($this->inherit_confirmation) && ($this->inherit_confirmation->is_confirmed())) {
+ $this->pass_attributes_to_members();
+ }
+
/* Watch for events */
if ((isset($_POST['action'])) && ($this->acl_is_writeable("FAIstate")) && isset($this->mapActions[$_POST['saction']]) ){
"update" => _("Software update"),
"wake" => _("Wake"),
"reinstall" => _("Reinstall"),
- "rescan" => _("Rescan hardware")
+ "rescan" => _("Rescan hardware"),
+ "localboot" => _("Force localboot")
# "memcheck" => _("Memory test"),
# "sysinfo" => _("System analysis")
));
));
}
+ function pass_attributes_to_members()
+ {
+ foreach ($this->member_dn as $dn) {
+ $member_obj = new worktabs($this->config, $this->config->data['TABS']['WORKTABS'], $dn, 'workstation');
+ $member_obj->by_object['workgeneric']->set_everything_to_inherited();
+ $member_obj->save();
+ }
+ }
+
function PrepareForCopyPaste($source)
{
/* Create used ntp server array */