Code

Fixed terminal event handling
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 4 Mar 2008 13:28:24 +0000 (13:28 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 4 Mar 2008 13:28:24 +0000 (13:28 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9316 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc
gosa-plugins/goto/admin/systems/goto/class_terminalStartup.inc

index a09bff8595941cf3c74566ab9430dae6729f31ab..a47f19b50228f89aee639f08cba683756c495a5f 100644 (file)
@@ -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));
index ad4e4780169aa46125caf3ac77e4e3343c342d89..f8289e76b706cf2f9caae8eebb44784706d5ecb7 100644 (file)
@@ -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));