diff --git a/plugins/admin/systems/class_workstationGeneric.inc b/plugins/admin/systems/class_workstationGeneric.inc
index 33a49bcb040347a9de0ab30398f0989b91ac99b5..88abf046654cc65fea107de49e8fdad174eaba4b 100644 (file)
var $gotoCdromEnable= "";
var $ghCpuType= "-";
var $ghMemSize= "-";
- var $macAddress= "";
- var $ipHostNumber= "";
var $ghUsbSupport= "-";
var $ghNetNic= array();
var $ghIdeDev= array();
/* Plugin side filled */
var $modes= array();
+ var $netConfigDNS;
+
/* attribute list for save action */
var $ignore_account= TRUE;
- var $attributes= array("gotoMode", "macAddress", "gotoSyslogServer", "gotoNtpServer",
+ var $attributes= array("gotoMode", "gotoSyslogServer", "gotoNtpServer",
"gotoFloppyEnable", "gotoCdromEnable", "cn", "gotoSndModule",
- "ghCpuType", "ghMemSize", "ghUsbSupport", "ipHostNumber",
+ "ghCpuType", "ghMemSize", "ghUsbSupport",
"ghGfxAdapter", "ghSoundAdapter", "gotoLastUser", "l","FAIscript");
var $objectclasses= array("top", "gotoWorkstation", "GOhard","FAIobject");
function workgeneric ($config, $dn= NULL)
{
plugin::plugin ($config, $dn);
-
+ $this->netConfigDNS = new termDNS($this->config,$this->dn,$this->objectclasses);
/* Load available modes */
$ldap= $this->config->get_ldap_link();
$ldap->cd ($this->config->current['BASE']);
if ($cmd == ""){
print_red(_("No ACTIONCMD definition found in your gosa.conf"));
} else {
- exec ($cmd." ".$this->macAddress." ".escapeshellarg($_POST['saction']), $dummy, $retval);
+ exec ($cmd." ".$this->netConfigDNS->macAddress." ".escapeshellarg($_POST['saction']), $dummy, $retval);
if ($retval != 0){
print_red(sprintf(_("Execution of '%s' failed!"), $cmd));
} else {
$smarty->assign($val."_select", $this->$val);
$smarty->assign($val."ACL", chkacl($this->acl, $val));
}
- $smarty->assign("ipHostNumber", $this->ipHostNumber);
- $smarty->assign("macAddress", $this->macAddress);
$smarty->assign("actionACL", chkacl($this->acl, 'action'));
/* Show main page */
- $smarty->assign("netconfig", dirname(__FILE__)."/network.tpl");
+ $smarty->assign("netconfig", $this->netConfigDNS->execute());
return($smarty->fetch (get_template_path('workstation.tpl', TRUE)));
}
unset($og->member[$this->dn]);
$og->save ();
}
-
+ $this->netConfigDNS->remove_from_parent();
}
if (isset($_POST['base']) && chkacl($this->acl, "create") == ""){
$this->base= $_POST['base'];
}
+ $this->netConfigDNS->save_object();
}
/* Check supplied data */
function check()
{
- $message= array();
+ $message=$this->netConfigDNS->check();
$ui= get_userinfo();
$this->dn= "cn=".$this->cn.",ou=workstations,ou=systems,".$this->base;
$this->handle_post_events("modify");
}
}
+ $this->netConfigDNS->save($this->dn);
show_ldap_error($ldap->get_error());
}