From: hickert Date: Tue, 4 Mar 2008 13:28:24 +0000 (+0000) Subject: Fixed terminal event handling X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3adcf1e28af4ff1cc81ac74e3da4aae5220a0ce9;p=gosa.git Fixed terminal event handling git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9316 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc index a09bff859..a47f19b50 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc @@ -177,9 +177,9 @@ class termgeneric extends plugin /* Check if we have an DaemonEvent for this action */ if(class_available("DaemonEvent_".$action)){ - $events = DaemonEvent::get_event_types(SYSTEM_EVENT); - if(isset($events['BY_CLASS']["DaemonEvent_".$action])){ - $evt = $events['BY_CLASS']["DaemonEvent_".$action]; + $events = DaemonEvent::get_event_types(SYSTEM_EVENT | HIDDEN_EVENT); + if(isset($events['TRIGGERED']["DaemonEvent_".$action])){ + $evt = $events['TRIGGERED']["DaemonEvent_".$action]; $tmp = new $evt['CLASS_NAME']($this->config); $tmp->add_targets(array($this->netConfigDNS->macAddress)); $tmp->set_type(TRIGGERED_EVENT); @@ -544,11 +544,11 @@ class termgeneric extends plugin /* Send installation activation */ - if ($activate){ - $events = DaemonEvent::get_event_types(SYSTEM_EVENT); + if ($activate && class_available("DaemonEvent")){ + $events = DaemonEvent::get_event_types(SYSTEM_EVENT | HIDDEN_EVENT); $o_queue = new gosaSupportDaemon(); - if(isset($events['BY_CLASS']['DaemonEvent_installation_activation'])){ - $evt = $events['BY_CLASS']['DaemonEvent_installation_activation']; + if(isset($events['TRIGGERED']['DaemonEvent_installation_activation'])){ + $evt = $events['TRIGGERED']['DaemonEvent_installation_activation']; $tmp = new $evt['CLASS_NAME']($this->config); $tmp->set_type(TRIGGERED_EVENT); $tmp->add_targets(array($this->netConfigDNS->macAddress)); diff --git a/gosa-plugins/goto/admin/systems/goto/class_terminalStartup.inc b/gosa-plugins/goto/admin/systems/goto/class_terminalStartup.inc index ad4e47801..f8289e76b 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_terminalStartup.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_terminalStartup.inc @@ -445,11 +445,11 @@ class termstartup extends plugin /* Send ldap configuration update */ - if ($ldap_changed){ - $events = DaemonEvent::get_event_types(SYSTEM_EVENT); + if ($ldap_changed && class_available("DaemonEvent")){ + $events = DaemonEvent::get_event_types(SYSTEM_EVENT | HIDDEN_EVENTS); $o_queue = new gosaSupportDaemon(); - if(isset($events['BY_CLASS']['DaemonEvent_reload_ldap_config'])){ - $evt = $events['BY_CLASS']['DaemonEvent_reload_ldap_config']; + if(isset($events['TRIGGERED']['DaemonEvent_reload_ldap_config'])){ + $evt = $events['TRIGGERED']['DaemonEvent_reload_ldap_config']; $tmp = new $evt['CLASS_NAME']($this->config); $tmp->set_type(TRIGGERED_EVENT); $tmp->add_targets(array($this->parent->by_object['termgeneric']->netConfigDNS->macAddress));