summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 314b381)
raw | patch | inline | side by side (parent: 314b381)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 4 Mar 2008 12:51:09 +0000 (12:51 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 4 Mar 2008 12:51:09 +0000 (12:51 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9308 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/addons/goto/class_gotomasses.inc | patch | blob | history | |
gosa-plugins/goto/addons/goto/events/class_DaemonEvent.inc | patch | blob | history |
diff --git a/gosa-plugins/goto/addons/goto/class_gotomasses.inc b/gosa-plugins/goto/addons/goto/class_gotomasses.inc
index 2a80bf2875e4580b4edd378f3be8c88c1821ba1b..ee55782d20ee56026188069097dee14f7d165a24 100644 (file)
$type = FALSE;
if(isset($this->entries[$id])){
$event = $this->entries[$s_entry];
-
-
- if($event['STATUS'] == "waiting" && isset($this->events['BY_QUEUED_ACTION'][$event['HEADERTAG']])){
- $type = $this->events['BY_QUEUED_ACTION'][$event['HEADERTAG']];
+ if($event['STATUS'] == "waiting" && isset($this->events['QUEUED'][$event['HEADERTAG']])){
+ $evt_name = $this->events['QUEUED'][$event['HEADERTAG']];
+ $type = $this->events['BY_CLASS'][$evt_name];
$this->dialog = new $type['CLASS_NAME']($this->config,$event);
}
}
/* Only remove WAITING or ERROR entries */
if(in_array($task['STATUS'],array("waiting","error"))){
$this->ids_to_remove[] = $task['ID'];
- if(isset($this->events['BY_QUEUED_ACTION'][$task['HEADERTAG']])){
- $evt = $this->events['BY_QUEUED_ACTION'][$task['HEADERTAG']];
+ if(isset($this->events['QUEUED'][$task['HEADERTAG']])){
+ $evt_name = $this->events['QUEUED'][$task['HEADERTAG']];
+ $evt = $this->events['BY_CLASS'][$evt_name];
$tmp.= "\n".$task['ID']." - ".$evt['s_Menu_Name']." ".$task['MACADDRESS'];
}else{
$tmp.= "\n".$task['ID']." - ".$task['HEADERTAG']." ".$task['MACADDRESS'];
$divlist->SetHeadpageMode();
$s = ".|"._("Actions")."|\n";
$s.= "..|<img src='images/list_new.png' alt='' border='0' class='center'> "._("Create")."\n";
- foreach($this->events['BY_SCHEDULED_ACTION'] as $name => $event){
- $name = $event['CLASS_NAME'];
+
+ foreach($this->events['SCHEDULED'] as $name => $event){
$s.= "...|".$event['MenuImage']." ".$event['s_Menu_Name']."|add_event_".$name."\n";
}
if($this->acl_is_removeable()){
/* Check if this event exists as Daemon class
* In this case, display a more accurate entry.
*/
- if(isset($this->events['BY_QUEUED_ACTION'][$task['HEADERTAG']]['s_Menu_Name'])){
- $event_type = $this->events['BY_QUEUED_ACTION'][$task['HEADERTAG']];
- $display2= $event_type['s_Menu_Name'];
+ if(isset($this->events['QUEUED'][$task['HEADERTAG']])){
+ $evt_name = $this->events['QUEUED'][$task['HEADERTAG']];
+ $event_type = $this->events['BY_CLASS'][$evt_name];
+ $display2 = $event_type['s_Menu_Name'];
if(strlen($display2) > 20){
$display2 = substr($display2,0,18)."...";
diff --git a/gosa-plugins/goto/addons/goto/events/class_DaemonEvent.inc b/gosa-plugins/goto/addons/goto/events/class_DaemonEvent.inc
index f5da13b044843c03ab19e9d3356ba69fb50f88dd..e7fc70443e863d9301c933d3109deb4897c12fe0 100644 (file)
{
global $class_mapping,$config;
$list = array();
- $list['BY_CLASS'] = array();
- $list['BY_TRIGGERED_ACTION'] = array();
- $list['BY_SCHEDULED_ACTION'] = array();
- $list['BY_QUEUED_ACTION'] = array();
+ $list['BY_CLASS'] = array();
+ $list['TRIGGERED'] = array();
+ $list['SCHEDULED'] = array();
+ $list['QUEUED'] = array();
foreach($class_mapping as $name => $path){
if(preg_match("/^DaemonEvent_/",$name)){
$evt = $tmp->get_event_info();
$list['BY_CLASS'][$name] = $evt;
if(isset($evt['s_Trigger_Action'])){
- $list['BY_TRIGGERED_ACTION'][$evt['s_Trigger_Action']] = $evt;
+ $list['TRIGGERED'][$name] = $evt;
+ $list['QUEUED'][$evt['s_Trigger_Action']] = $name;
}
if(isset($evt['s_Schedule_Action'])){
- $list['BY_SCHEDULED_ACTION'][$evt['s_Schedule_Action']] = $evt;
+ $list['SCHEDULED'][$name] = $evt;
+ $list['QUEUED'][$evt['s_Schedule_Action']] = $name;
}
if(isset($evt['s_Queued_Action'])){
- $list['BY_QUEUED_ACTION'] [$evt['s_Queued_Action']] = $evt;
+ $list['QUEUED'][$evt['s_Queued_Action']] = $name;
}
}
}