summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 305bcc4)
raw | patch | inline | side by side (parent: 305bcc4)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 5 Mar 2008 12:53:45 +0000 (12:53 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 5 Mar 2008 12:53:45 +0000 (12:53 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9352 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc | patch | blob | history | |
gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc | patch | blob | history |
diff --git a/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc
index a47f19b50228f89aee639f08cba683756c495a5f..3b4f67d733ff62db07ceb4d899337fda0d1caabd 100644 (file)
"ghGfxAdapter", "ghSoundAdapter", "gotoLastUser");
var $objectclasses= array("top", "gotoTerminal", "GOhard");
- var $mapActions = array("reboot" => "",
- "rescan" => "",
- "wake" => "",
- "memcheck" => "memcheck",
- "sysinfo" => "sysinfo");
+ var $validActions = array("reboot" => "", "rescan" => "", "wake" => "", "memcheck" => "", "sysinfo" => "");
var $fai_activated = FALSE;
var $view_logged = FALSE;
$this->is_account= !$this->is_account;
}
- if (isset($_POST['action']) && $this->acl_is_writeable("FAIstate") && isset($this->mapActions[$_POST['saction']])){
-
-
-
- /* Check given action */
- $mapEvent = array("wake" => "wakeup",
- "instant_update" => "update");
+ if (isset($_POST['action']) && $this->acl_is_writeable("FAIstate") && isset($this->validActions[$_POST['saction']])){
$action = $_POST['saction'];
- if(isset($mapEvent[$action])){
- $action = $mapEvent[$action];
- }
/* Check if we have an DaemonEvent for this action */
if(class_available("DaemonEvent_".$action)){
}
}
}else{
-
- msg_dialog::display(_("Missing Daemon Event"),
- sprintf(_("The requested action does not exists '%s' Sending event manually."),"DaemonEvent_".$action),ERROR_DIALOG);
-
- /* No event found, send action manually.
- */
- $method= "gosa";
- $action= $_POST['saction'];
- if ($action == "reinstall" || $action == "update" || $action == "instant_update"){
- $method= "job";
- }
-
- gosaSupportDaemon::send("${method}_trigger_action_".$action,
- $this->netConfigDNS->macAddress,
- array("macAddress" => $this->netConfigDNS->macAddress));
+ msg_dialog::display(_("Event error"),
+ sprintf(_("Event '%s' is not available!"),$action),ERROR_DIALOG);
}
+
}
/* Base select dialog */
diff --git a/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc
index 78a6c374ee1a88fdb2b953518bc4c9f214be53af..8f5ac5eca81898f0c72b54cbdb474122b7a9dbef 100644 (file)
"ghGfxAdapter", "ghSoundAdapter", "gotoLastUser", "l","FAIscript");
var $objectclasses= array("top", "gotoWorkstation", "GOhard");
- var $mapActions = array("reboot" => "",
- "localboot" => "localboot",
- "halt" => "",
- "update" => "softupdate",
- "reinstall" => "install",
- "rescan" => "",
- "wake" => "",
- "memcheck" => "memcheck",
- "sysinfo" => "sysinfo");
-
+ var $validActions = array("reboot" => "", "localboot" => "", "halt" => "", "update" => "", "reinstall" => "",
+ "rescan" => "", "wake" => "", "memcheck" => "", "sysinfo" => "");
var $fai_activated = FALSE;
}
}
- if ((isset($_POST['action'])) && ($this->acl_is_writeable("FAIstate")) && isset($this->mapActions[$_POST['saction']]) ){
+ if ((isset($_POST['action'])) && ($this->acl_is_writeable("FAIstate")) && isset($this->validActions[$_POST['saction']]) ){
$action= $_POST['saction'];
/* Check if we have an DaemonEvent for this action */
$o_queue->get_error()),ERROR_DIALOG);
}
}
+ } else {
+ msg_dialog::display(_("Event error"),
+ sprintf(_("Event '%s' is not available!"),$action),ERROR_DIALOG);
}
+
}
/* Do we represent a valid terminal? */