summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8ad0ff0)
raw | patch | inline | side by side (parent: 8ad0ff0)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 4 Mar 2008 12:30:59 +0000 (12:30 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 4 Mar 2008 12:30:59 +0000 (12:30 +0000) |
-Only display those that are schedulable
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9307 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9307 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 13c563bb3005d7dfa7459f495861d06cb64f37d9..2a80bf2875e4580b4edd378f3be8c88c1821ba1b 100644 (file)
$divlist->SetHeadpageMode();
$s = ".|"._("Actions")."|\n";
$s.= "..|<img src='images/list_new.png' alt='' border='0' class='center'> "._("Create")."\n";
- foreach($this->events['BY_CLASS'] as $name => $event){
+ foreach($this->events['BY_SCHEDULED_ACTION'] as $name => $event){
+ $name = $event['CLASS_NAME'];
$s.= "...|".$event['MenuImage']." ".$event['s_Menu_Name']."|add_event_".$name."\n";
}
if($this->acl_is_removeable()){
diff --git a/gosa-plugins/goto/addons/goto/events/class_DaemonEvent.inc b/gosa-plugins/goto/addons/goto/events/class_DaemonEvent.inc
index ae4f7e3105402c6aec7aad6a62a18a54ce9db127..f5da13b044843c03ab19e9d3356ba69fb50f88dd 100644 (file)
define("SCHEDULED_EVENT",1);
define("TRIGGERED_EVENT",2);
-define("HIDDEN_EVENT",0);
-define("SYSTEM_EVENT",1);
-define("USER_EVENT" ,2);
+define("HIDDEN_EVENT",1);
+define("SYSTEM_EVENT",2);
+define("USER_EVENT" ,4);
/*! \brief This is the event base class
public function get_event_info()
{
$data =array();
- $data['CLASS_NAME'] = get_class($this);
- foreach(array("s_Menu_Name","s_Event_Name","s_Queued_Action","s_Schedule_Action","s_Trigger_Action") as $attr){
- $data[$attr] = $this->$attr;
+ $data['CLASS_NAME'] = get_class($this);
+ $data['s_Menu_Name'] = $this->s_Menu_Name;
+ $data['s_Event_Name'] = $this->s_Event_Name;
+ foreach(array("s_Queued_Action","s_Schedule_Action","s_Trigger_Action") as $attr){
+ if(!empty($this->$attr)){
+ $data[$attr] = $this->$attr;
+ }
}
$data['MenuImage'] = "<img src='".$this->s_Menu_Image."' alt='".$this->s_Menu_Name."' border='0' class='center'>";
$data['ListImage'] = "<img src='".$this->s_List_Image."' title='".$this->s_Event_Name."'
foreach($class_mapping as $name => $path){
if(preg_match("/^DaemonEvent_/",$name)){
$tmp = new $name($config);
-
if($tmp->visible_for & $type){
$evt = $tmp->get_event_info();
-
$list['BY_CLASS'][$name] = $evt;
- $list['BY_TRIGGERED_ACTION'][$evt['s_Trigger_Action']] = $evt;
- $list['BY_SCHEDULED_ACTION'][$evt['s_Schedule_Action']] = $evt;
- $list['BY_QUEUED_ACTION'] [$evt['s_Queued_Action']] = $evt;
+ if(isset($evt['s_Trigger_Action'])){
+ $list['BY_TRIGGERED_ACTION'][$evt['s_Trigger_Action']] = $evt;
+ }
+ if(isset($evt['s_Schedule_Action'])){
+ $list['BY_SCHEDULED_ACTION'][$evt['s_Schedule_Action']] = $evt;
+ }
+ if(isset($evt['s_Queued_Action'])){
+ $list['BY_QUEUED_ACTION'] [$evt['s_Queued_Action']] = $evt;
+ }
}
}
}