summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5d17afc)
raw | patch | inline | side by side (parent: 5d17afc)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 2 Jun 2006 04:56:37 +0000 (04:56 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 2 Jun 2006 04:56:37 +0000 (04:56 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3616 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_terminalGeneric.inc | patch | blob | history |
diff --git a/plugins/admin/systems/class_terminalGeneric.inc b/plugins/admin/systems/class_terminalGeneric.inc
index 98f247e7515a6ed32f9026a9f1b498a9f527a405..3872b38242e3a26077814f9b704a4a571581c661 100644 (file)
"ghGfxAdapter", "ghSoundAdapter", "gotoLastUser");
var $objectclasses= array("top", "gotoTerminal", "GOhard");
+ var $mapActions = array("reboot" => "",
+ "instant_update" => "softupdate",
+ "update" => "sceduledupdate",
+ "reinstall" => "install",
+ "rescan" => "",
+ "memcheck" => "memcheck",
+ "sysinfo" => "sysinfo");
+
+
function termgeneric ($config, $dn= NULL)
{
plugin::plugin ($config, $dn);
}
if (isset($_POST['action'])){
+
+ /* Set FAIstate */
+ $ldap = $this->config->get_ldap_link();
+ $ldap->cd($this->config->current['BASE']);
+ $ldap->cat($this->dn,array("objectClass"));
+ $res = $ldap->fetch();
+
+ $attrs = array();
+ $attrs['FAIstate'] = "";
+ if(isset($this->mapActions[$_POST['saction']])){
+ $attrs['FAIstate'] = $this->mapActions[$_POST ['saction']];
+ }
+
+ for($i = 0; $i < $res['objectClass']['count'] ; $i ++){
+ $attrs['objectClass'][] = $res['objectClass'][$i];
+ }
+
+ if(($attrs['FAIstate'] != "") && (!in_array("FAIobject",$attrs['objectClass']))){
+ $attrs['objectClass'][] = "FAIobject";
+ }
+
+ if($attrs['FAIstate'] == ""){
+ #FIXME we should check if FAIobject is used anymore
+ $attrs['FAIstate'] = array();
+ }
+
+ $ldap->cd($this->dn);
+ $ldap->modify($attrs);
+ show_ldap_error($ldap->get_error());
+
switch($_POST['saction']){
case 'wake':
$cmd= search_config($this->config->data['TABS'], "termgeneric", "WAKECMD");
/* Offline */
if ($retval == 0){
- $smarty->assign("actions", array("halt" => _("Switch off"), "reboot" => _("Reboot")));
+ $smarty->assign("actions", array( "halt" => _("Switch off"),
+ "reboot" => _("Reboot"),
+ "memcheck" => _("Memory test"),
+ "sysinfo" => _("System analysis")));
} else {
- $smarty->assign("actions", array("wake" => _("Wake up")));
+ $smarty->assign("actions", array("wake" => _("Wake up"),
+ "memcheck" => _("Memory test"),
+ "sysinfo" => _("System analysis")));
}
+
/* Arrays */
$smarty->assign("modes", $this->modes);